I agree with the fact that there are two timeouts but the one I am
talking about is SOCKET_TIMEOUT.
It is set in --socket-timeout in widget.py and passed to rocket in
line 777 of main.py

rocket.SOCKET_TIMEOUT = socket_timeout

which does change the constant value SOCKET_TIMEOUT=1 to 60.

I am pretty sure decreasing this value fixes this problem on my
machine.

On Jan 31, 2:40 pm, nick name <i.like.privacy....@gmail.com> wrote:
> On Tuesday, January 31, 2012 9:37:54 AM UTC-5, Massimo Di Pierro wrote:
>
> > In trunk socket timeout is 60 and this resulted in another problem.
> > Ctrl-C waits for 60 seconds before joining the worker processes.
> > Perhaps we should increate socket-timeout, catch Ctrl+C and then kill
> > the process instead of joining the workers.
>
> Note that rocket.py has two "socket timeout" settings:
> 1. a constant of 1 second (in web2py trunk and in rocket trunk), which is
> the socket timeout passed down to the python socket library. calling send()
> will raise an exception if not a single byte can be sent within that time.
> calling sendall() will  raise an exception if this time has passed without
> being able to send a single byte (but: if it succeeds in sending 1 byte
> every second, sendall() will never actually time out - a 100K file will
> take more than 24hours!).
>
> 2. The timeout passed to the rocket initialization. This is the "monitor"
> timeout, which rocket will use to determine if a connection is stale (or
> otherwise working too slow).
>
> So the 60 seconds that affect Ctrl-C is almost unrelated to the
> SOCKET_TIMEOUT constant in rocket which can be used to see if sendall() is
> indeed the cause of the corruption problem

Reply via email to