Hello

I'm using web2py (Version 2.14.6-stable+timestamp.2016.05.09.19.18.48). 
Last week I've start getting strange errors on client side ("waiting for 
available socket") - I'm using Chrome. After investigation I found that DAL 
(PostgreSQL) object didn't close connection to database after finishing 
request: 

netstat -p -n -o | grep "<DATABASE_PORT_NUMBER>" 

return a lot of entries like (~300):

tcp        0      0 127.0.0.1:36062         127.0.0.1:5434          
TIME_WAIT   -                    timewait (24.30/0/0)

DAL object is created in models/db.py and then it is passed to Auth 
constructor. When there is no incoming requests to application after some 
time (60s) every TIME_WAIT socket is closed and everything looks fine, When 
requests start comming then number of TIME_WAIT sockets start growing and 
stay about 300.

Is there a way to call close on underlaying postgresql connection layer?
Is there a way to invoke some code every time processing data is finished 
for each request (after server proces user quest and before start sending 
it to browser)?
or maybe that was fixed in latest version

BR
  KJ

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to