Hello, I have been using web2py with oracle since few months now. With small loads everything works fine, but when the load grows, often the python process gets killed with a segfault; after few headaches to understand what was going on, I think I spotted the problem and tried a solution that works for me. It seems the cx_Oracle libs when used in threaded programs (such as the web2py server) needs to handle some locking, as suggested in the cx_Oracle documentation found at
http://cx-oracle.sourceforge.net/html/module.html [...] The threaded argument is expected to be a boolean expression which indicates whether or not Oracle should use the mode OCI_THREADED to wrap accesses to connections with a mutex. Doing so in single threaded applications imposes a performance penalty of about 10-15% which is why the default is False. [...] I am not 100% sure this was the problem as I couldnt find a reasonable way to prove it; however, since when I applied the following patch (thats the only change I've made) I havent had crashes anymore. So this is the simple patch I used and I propose --- sql.py 2010-04-04 18:18:26.000000000 +0200 +++ sql_orig.py 2010-04-04 18:17:38.000000000 +0200 @@ -964,7 +964,7 @@ elif self._uri[:9] == 'oracle://': self._dbname = 'oracle' self._pool_connection(lambda : \ - cx_Oracle.connect(self._uri[9:],threaded=True)) + cx_Oracle.connect(self._uri[9:])) self._cursor = self._connection.cursor() self._execute = lambda a: \ oracle_fix_execute(a,self._cursor.execute) I'd like someone else to confirm this, and I really hope this can help. Kind regards, G. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.