[mapserver-dev] Mapserver thread safety

Umberto Nicoletti umberto.nicoletti at gmail.com
Tue Aug 13 07:57:44 PDT 2013


It could be, but I am not sure. For now I have locked access to the entry
point for wms GetCapabilities requests.

You can follow the discussion here:
https://github.com/mapserver/mapserver/pull/4728

BR,
Umberto


On Tue, Aug 13, 2013 at 4:31 PM, <Michel.Dastous at bentley.com> wrote:

>  About WFS/WMS thread safety, looking at mapows.c I found a single static
> variable (epsgCode) used in msOWSGetEPSGProj().  ****
>
> ** **
>
> Instead of returning a static pointer, the method could easily take a
> buffer + buffer size as parameters… Not a big deal except that 62 calls to
> that function will have to be modified.****
>
> ** **
>
> Is this the only thing that make WFS/WFS server non thread safe?****
>
> ** **
>
> Thanks !****
>
> ** **
>
> ** **
>
> *From:* Michel Dastous
> *Sent:* Tuesday, August 13, 2013 9:45 AM
> *To:* 'Umberto Nicoletti'
>
> *Cc:* MapServer Dev Mailing List
> *Subject:* RE: [mapserver-dev] Mapserver thread safety****
>
>  ** **
>
> Thank you very much! I will test it as soon as possible.****
>
> ** **
>
> From the page you sent me I realized that WMS/WFS server is not thread
> safe (“WMS/WFS server: static data used for state of dispatcher”).   Is
> there any plan to fix this ? I could not find any ticket about this****
>
> ** **
>
> Thanks.****
>
> ** **
>
> *From:* Umberto Nicoletti [mailto:umberto.nicoletti at gmail.com<umberto.nicoletti at gmail.com>]
>
> *Sent:* Tuesday, August 13, 2013 8:49 AM
> *To:* Michel Dastous
> *Cc:* MapServer Dev Mailing List
> *Subject:* Re: [mapserver-dev] Mapserver thread safety****
>
> ** **
>
> FYI, I've opened this pull request which should fix the Oracle spatial
> issue you are seeing:****
>
> https://github.com/mapserver/mapserver/pull/4729****
>
> Let me know if it works for you.****
>
> ** **
>
> BR,****
>
> Umberto****
>
> On Tue, Aug 13, 2013 at 8:23 AM, Umberto Nicoletti <
> umberto.nicoletti at gmail.com> wrote:****
>
> Michel,****
>
> this page attempts to keep track of which Mapserver components are thread
> safe:****
>
> ** **
>
> http://mapserver.org/faq.html#is-mapserver-thread-safe****
>
> ** **
>
> it must not be completely up to date as, as you found out, Oracle is
> listed as safe, while it's not.****
>
> As for fixing it, it should be relatively easy as those two variables can
> be made local to the functions using them.****
>
> ** **
>
> Please open an issue and I will look into it asap.****
>
> ** **
>
> Umberto****
>
> ** **
>
> ** **
>
> On Mon, Aug 12, 2013 at 9:44 PM, <Michel.Dastous at bentley.com> wrote:****
>
>   Hi all,****
>
>  ****
>
> I’ve been testing mapserver and its c# mapscript API for a while now, and
> I have noticed that making simultaneous Draw request on multiple maps
> containing Oracle layer will end up in memory corruption.  No surprise here
> since maporaclespatial.c uses static variables (ordinates_tdo and
> ordinates).****
>
>  ****
>
> My question is: Does anyone have already evaluated how much work it would
> require to make it thread safe (i.e remove those static variables from the
> code) ?****
>
>  ****
>
> Furthermore, I have also tested the MSSQL plugin which is stable under
> same conditions, unfortunately it doesn’t seem to scale very well my 4 core
> machines with maximum CPU usage of 15%. ****
>
>  ****
>
> I don’t think the problem come from mapserver’ s rendering engine… when
> drawing a map with inlined data, I could easily reach a 90% usage.****
>
>  ****
>
> So any suggestions/information would be welcome.****
>
>  ****
>
> Thanks.****
>
>  ****
>
> ** **
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev****
>
>  ** **
>
> ** **
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20130813/756a9681/attachment-0001.html>


More information about the mapserver-dev mailing list