On Friday, September 7, 2012 4:57:37 AM UTC-4, Michele Comitini wrote:
>
> lucas,
>
> OK. So there is no error at SQL level.  The problem is probably a closing 
> cursor that happens somewhere in the DAL, that is triggered by some 
> usage/environment peculiar to your application.
>
> Check the following just to be sure:
> 1) pooling connections.  Try to work with pooled connection and without 
> and see if anything changes.


 educate me a bit, how do i turn on/off pooling connections?  this is what 
i know for sure.  once a user gets the internal error/ticket with "db 
cursor has been closed", the only way to get that user logged in, is by 
having them clear all cookies and website data in their browser, and i 
clearing all sessions under the application's sessions folder, and then 
restarting the httpd service.  then the user can login, but also what is 
unusual, is the first time they log in after all those steps, it 
immediately returns them to the login page where they have to login again. 
 it is like the site lost the first login.  but then the second time it 
will go fine and they can proceed as normal.

2) explicit commits, rollbacks.
>

according to massimo, web2py handles all that internally so on the surface, 
we should not be doing much explicit commits and rollbacks. so i don't have 
those calls in my code.

3) access to  DBAPI cursor bypassing the DAL.
>

i would have to write a separate app to do that to bypass all my code in 
order to bread it down to more basic SQL statements.  i think.
 

> 4) check if psycopg2 is recent and compiled againsts libpq-9.1
>

that is good point.  in fact, how do i know if web2py is using pg8000 or 
psycopg2?  in fact both are on my machine.  i think there is a syntax in 
the DAL for specifying which one.  perhaps i should use one over the other. 

Also what kind of server configuration you have? rocket, apache+wsgi or ...
>

apache+wsgi on a centos 6.3 server, old single core compaq at the moment.
 

> Does the error happen on a multicore machine and there are concurrent 
> requests?  See the pooling item above..
>
> What we really need is a simplified version of your code that shows  the 
> same error. 
>

yes, i agree and i have backing off/commenting a lot of code to isolate the 
problem.  but still baffled. 


> mic
>

-- 



Reply via email to