[mapserver-dev] Mapserver thread safety
Michel.Dastous at bentley.com
Michel.Dastous at bentley.com
Tue Aug 13 10:08:43 PDT 2013
Andreas,
Is it simple as adding a new flag? If so a compile switch could be added to enable it.
Thanks
-----Original Message-----
From: Andreas Albarello [mailto:andreas.albarello at tol.bz.it]
Sent: Tuesday, August 13, 2013 12:19 PM
To: Michel Dastous; mapserver-dev at lists.osgeo.org
Subject: RE: Mapserver thread safety
On 12.08.2013 21:44, Michel.Dastous at bentley.com wrote
> 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).
Michel,
aside from the static variables in maporaclespatial.c there might be another issue at play here. Especially when using an Oracle 11g client, I've found it necessary to pass both OCI_OBJECT and OCI_THREADED to OCIEnvCreate (in msOCISetHandlers). I think right now there's still only OCI_OBJECT being passed to the mode parameter of OCIEnvCreate in maporaclespatial.c.
See also http://docs.oracle.com/cd/B28359_01/appdev.111/b28395/oci16rel001.htm#i556149 and https://forums.oracle.com/thread/575746 with the latter suggesting that one might need to use OCI_THREADED even if the application doesn't use the same environment handles across different threads which I think MapServer's connection pooling is already taking care of.
Regards,
--
--------------------------------------------------------------------
Andreas Albarello
Analysis & SW Development
Territorium Online srl/GmbH
Via Buozzi Str. 12
I 39100 Bolzano/Bozen
Phone: +39 0471 068611
Fax: +39 0471 068619
email: andreas.albarello at tol.bz.it
web: http://www.tol.bz.it
--------------------------------------------------------------------
More information about the mapserver-dev
mailing list