Re: [cx-oracle-users] Crash of OCIStmtRelease during cursor.close()
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2010-11-03 13:49:50
|
Hi, just a few observations/suggestions 1) The latest version of cx_Oracle is now 5.0.4 which may or may not have resolved this problem. I've never noticed it myself so wouldn't be able to say. 2) Not sure why you wouldn't simply call cursor.execute(stmt) over cursor.prepare() and cursor.executemanyprepared(). Those last two are only needed for specialized situations and your code doesn't appear to require special processing. 3) There is no need to call cursor.close() so you can try leaving that out as well. 4) Do you have multiple threads in your application that are accessing Oracle? Database change notification? Either of those require threaded = True as part of the constructor of the connection object. Hopefully one of those resolves your issue. Anthony On Wed, Nov 3, 2010 at 5:09 AM, <Gui...@su...> wrote: > Hello, > > > > I am using cxOracle 4.4 on a Windows XP 32 bits platform with an Oracle 11.2 > client and a distant Oracle 11.2 server. > > > > The problem I am getting since we migrated our software to Oracle 11 is that > during one of our long running processes, the software will sometimes > suddenly crash with no exception raised. > > Our process calls a PL/SQL package hundreds of thousands of times and > sometimes crashes after one of those calls has ended, in the middle of > cursor.close(). > > I determined that inside Cursor_Close(…) it is Cursor_FreeHandle(…) and then > the call to OCIStmtRelease that crashes. > > > > Here’s a simplified view of what we do: > > > > for(~200 000 times){ > > crs = Cursor() > > crs.prepare(stmt) # stmt is a call to a PL/SQL package > > crs.executemanyprepared(1) > > crs.close() => sometimes crashes in Cursor_FreeHandle during call to > OCIStmtRelease, never in the same iteration of the loop > > } > > > > The thing is that this crash does not happen systematically but rather in > about one out of two executions of our process. > > > > We previously used cxOracle 4.1.1 but moved to 4.4 when noticing this > problem with Oracle 11. But this 4.4 version doesn’t seem to be solving the > problem, unless we need to make more changes to the way we use cxOracle > after migrating to 4.4. > > > > Does anybody have a clue as to why OCIStmtRelease would sometimes > unexpectedly crash like that without throwing any exception? > > > > Thanks a lot for the help you can give me. I’ve been working for more than a > month on this problem and it’s becoming critical for our clients that a > solution be found. > > > > Guillaume Aouizerate > > > > > > ------------------------------------------------------------------------------ > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |