perhaps I misread your original post. Your patch suggested REMOVING threaded=True and all I am saying is that it is not there. Are you saying I misread your patch and you think threaded=True SHOULD be there?
Are you using connection pooling? That may be why it is needed. Massimo On Apr 5, 6:23 am, Gabriele Alberti <gabriele.albe...@gmail.com> wrote: > Hello, > I am sorry but I have to disagree. I dont know exactly what happens as > I am not into the DAL so much, but as I installed the latest version > (running 1.76.5 now) with no threaded argument in the cx_Oracle > connection I started getting back segfaults. They disappeared > immediately after I put the threaded=True argument.. > > If there's anything I can do to help, I'll be glad to. > > Regards, > > G. > > On Apr 5, 12:59 pm, Gabriele Alberti <gabriele.albe...@gmail.com> > wrote: > > > Hello, > > yes I am running 1.76.1 (2010-03-01 19:56:55); I'll try the latest and > > I'll let you know ASAP. > > > Thank you very much, > > > G. > > > On Apr 5, 5:43 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > Thank you Gabriele, > > > > is should definitively be threaded=False and not True since web2py > > > does not share connection between threads. Yet, this is already the > > > default. You must be running an older version of web2py.You should > > > upgrade. > > > > Massimo > > > > On Apr 4, 11:33 am, Gabriele Alberti <gabriele.albe...@gmail.com> > > > wrote: > > > > > 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.