lmacken / pyrasite

Inject code into running Python processes

Home Page:http://pyrasite.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The socket timeout is unusually short (5s). Increase, or make it configurable?

PiDelport opened this issue · comments

PyrasiteIPC appears to hardcode the socket timeout to 5 seconds, which is very low.

My first attempt at using Pyrasite was to execute some diagnostic code, which took longer than 5 seconds to execute, resulting in a timeout and disconnection. I had to read and modify my copy of the source in order to remove the timeout and make it usable.

To avoid surprising newcomers with this, I think it would be a good idea to increase the default timeout to 30 seconds (or more, or disable it?). Many invocations one might want to run with Pyrasite probably take more than 5 seconds to execute.

In addition, it's probably a good idea to expose a --timeout option to make the timeout user-configurable, for users that don't want the default.

I just ran into this as well. A configurable timeout would be very helpful.