just did a google for "cx_oracle threadsafe" and came up with this:

        http://mail.python.org/pipermail/db-sig/2004-January/003897.html

but then there also seems to be a more improved way as of 4.0.1 which is this:

        http://starship.python.net/crew/atuining/cx_Oracle/html/module.html

So, threading support is false by default since it has a 10-15% performance hit. would we like this flag to be on by default ?

heres a patch to apply to oracle.py in the 0.1 series, which will add 'threaded' as a keyword parameter to oracle's create_engine. try setting it to true and see if that fixes your problem:

--- lib/sqlalchemy/databases/oracle.py  (revision 1407)
+++ lib/sqlalchemy/databases/oracle.py  (working copy)
@@ -106,9 +106,10 @@
     ]}

class OracleSQLEngine(ansisql.ANSISQLEngine):
-    def __init__(self, opts, use_ansi = True, module = None, **params):
+ def __init__(self, opts, use_ansi = True, module = None, threaded=False, **params):
         self._use_ansi = use_ansi
self.opts = self._translate_connect_args((None, 'dsn', 'user', 'password'), opts)
+        self.opts['threaded'] = threaded
         if module is None:
             self.module = cx_Oracle
         else:



On May 15, 2006, at 10:13 AM, Florian Boesch wrote:

Hi,

Selecting from multiple threads with thread-count > 10 my app:
 * crashes without any error message
 * starts spweing out
cx_Oracle.DatabaseError: Error while trying to retrieve text for error ORA-12520
 * crashes with:
*** glibc detected *** double free or corruption (fasttop): 0x3eeff0b8 ***
 * all of the above

With 10 threads it seems to run rock-solid. With 11 it gets the errors
occasionally. with 50 it gets them quite reliably, with 200 you could
practically bet on the errors to happen. Though they don't show up regularly,
mostly they happen fast or not for a long time.

I get the error as well on Linux as on Windows.

Any ideas what I can do (other then limiting my web-server to 10 threads)?

Example Atached

Cheers,
Florian



<segmentation_fault.py>



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to