Re: [cx-oracle-users] cx_Oracle opens an excessive number of sessions
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2010-07-22 14:57:38
|
Hi, I have never seen that behavior before and I have been using cx_Oracle for well over a decade. Can you try the same thing with SQL*Plus? They use the same base libraries so if there is a problem with the client installation or other issue in your environment, that should show it up. Perhaps try an older version of the instant client (11.1)? Hopefully someone else may have seen this sort of behavior before and can help you out further. Anthony On Thu, Jul 22, 2010 at 1:26 AM, Hannes Bretschneider <hab...@gm...> wrote: > I have a problem using instantclient 11.2 and cx_Oracle 5.0.3. When I query > the database, cx_Oracle creates an excessive number of sessions to the > database (about 70). I already crashed the database once, because I went > over the allowed number of sessions (Oracle default is 150), after which my > sysadmin increased the number of allowed connections to about 4000. However, > he tells me I have to reduce the amount of resources I use and the number of > sessions, so he can set the allowed number of connections back to something > reasonable once the server goes into production. > The one thing I tried was to set cursor.arraysize to something smaller, but > it doesn't make any difference. > This is was happens: > import cx_Oracle > db = cx_Oracle.connect(user, pass, dsn) # Nothing bad happens here > cursor = db.cursor() # This is fine too > cursor.execute('SELECT foo FROM bar") # Opens an excessive number of > sessions > cursor.fetchone() # Read some records > cursor.fetchmany() > cursor.close() # Doesn't close the > many sessions > db.close() # Closes the > sessions. > --Hannes > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |