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
from sqlalchemy import *
import thread
engine = create_engine('oracle://dsn=mydb&user=myusert&password=mypass')
foo = Table('foo', engine,
Column('id', Integer, Sequence('foo_seq'), primary_key=True),
)
try: foo.drop()
except Exception, e: print e
try: foo.create()
except Exception, e: print e
foo.insert().execute()
def test():
while 1:
foo.select().execute().fetchone()
for _ in range(200):
thread.start_new_thread(test, ())
raw_input('enter to close')
"""
Traceback (most recent call last):
File "segmentation_fault.py", line 20, in test
foo.select().execute().fetchone()
File "build/bdist.linux-i686/egg/sqlalchemy/sql.py", line 473, in execute
File "build/bdist.linux-i686/egg/sqlalchemy/sql.py", line 378, in execute
File "build/bdist.linux-i686/egg/sqlalchemy/sql.py", line 355, in execute
File "build/bdist.linux-i686/egg/sqlalchemy/engine.py", line 626, in
execute_compiled
File "build/bdist.linux-i686/egg/sqlalchemy/engine.py", line 466, in
connection
File "build/bdist.linux-i686/egg/sqlalchemy/engine.py", line 191, in
_connection
File "build/bdist.linux-i686/egg/sqlalchemy/pool.py", line 89, in connect
File "build/bdist.linux-i686/egg/sqlalchemy/pool.py", line 132, in __init__
File "build/bdist.linux-i686/egg/sqlalchemy/pool.py", line 102, in get
File "build/bdist.linux-i686/egg/sqlalchemy/pool.py", line 219, in do_get
File "build/bdist.linux-i686/egg/sqlalchemy/pool.py", line 273, in <lambda>
cx_Oracle.DatabaseError: Error while trying to retrieve text for error ORA-12520
*** glibc detected *** double free or corruption (fasttop): 0x3eeff0b8 ***
"""