[mod_python] TimeOut and mp_conn.read (pywebsocket)
Bram Van Steenlandt
bram at diomedia.be
Mon Nov 3 14:24:24 UTC 2014
I've developed a websocket application using mod_python and pywebsocket.
It works but I have a problem (I'm using apache22 and mod_python 3.3.1
and python 2.6.6).
I'm using request.ws_stream.receive_message() to see if there are
messages from the client,
this works but always takes one second (between 0.99 and 1.05), I need
it to return faster (esp. when there is no message most of the time).
This is suppose to be controlled by the TimeOut config value in apache
but this is set to 60... (req.server.timeout is also 60)
I would think that the function returns after 60 seconds and not 1 when
there is no data, is there another timeout I'm missing ?
Can someone point me in the right direction ?
I there a way to set this from inside handler like with regular sockets ?
The pywebsocket package does include a way to work with a
messagereceiver (here receiving is done in a thread),
this works but it's difficult to debug, I think I would prefer a shorter
More information about the mod_python