Quoting Michael Bayer <[EMAIL PROTECTED]>: > alright...well in this test program , i dont see the "threading=True" > keyword sent to create_engine, the patch i checked in to 0.1 still > has "threading" defaulting to False. Ya I just put opts['threading'] = True in there for testing ^^
> also whats the threshhold at which this fails ? 50 concurrent > threads is pretty high? is memory staying constant ? Memory is staying very constant. 50 concurrent threads for a test load isn't that high. 200 threads for the server is a bit over the top, but I also could observe the error with 11 threads on the server, it just doesn't happen as fast/often. (note, my system's currently beeing hit between 5-16 requests/second in production, under this load the issue never happens) > On May 15, 2006, at 5:18 PM, Florian Boesch wrote: > > > For the life of me I couldn't figure that one out. Though I got a > > concise test > > programm for it. I applied your patch Michael, and it helps with > > the strange > > errors on select. But still eventually the programm Segmentation > > Fauls, no > > message and nothing. > > > > * Threading myself without cherrypy I couldn't reproduce the problem > > * Stressing cherrypy alone without sqlalchemy I couldn't reproduce > > the problem > > * Stressing both in concert only shows the behavior. > > > > So atached you find a test programm that is both a small cherrypy > > app (cherrypy > > 2.1) and a little web stress tester. > > > > Cheers, > > Florian > > > > Quoting Michael Bayer <[EMAIL PROTECTED]>: > > > >> 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> > >> > >> > > > > > > <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