On Monday, May 6, 2019 at 8:29:48 AM UTC-7, Krzysztof Jeleń wrote:
>
> Hello
>
> I'm using web2py (Version 2.14.6-stable+timestamp.2016.05.09.19.18.48). 
>

How long have you been using this version?  What OS and what front end and 
what version of Python?
 

> Last week I've start getting strange errors on client side 
>

What changed on your server?
 

> ("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: 
>

I've seen issues with Chrome talking to a local instance of web2py (on 
W10)  using Rocket, and Chrome seems to get into a state where something 
cache-related is driving a lot of requests into Rocket; Usually closing 
Chrome clears things up (actually, closing one window of Chrome is enough, 
and sometimes it seems to work to close just one tab -- if I get the right 
one; Chrome uses multiple processes, so windows are independent, and tabs 
may be also).  In this environment, I'm also using 2.14.6, though I've been 
trialing newer versions.



> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/9a3fef05-7df0-419e-a142-21ee2ca7249a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to