-
Notifications
You must be signed in to change notification settings - Fork 286
socket.timeout: timed out #204
Comments
Of course you can. |
@MrKiven |
client |
My server is fine,but client set socket_timeout=5000 or 5000+ does not work, it is also default 3000. When I count 3s, time out error come out. |
server side default timeout is 3s, @lxyu |
@MrKiven UserWarning: `timeout` deprecated, use `socket_timeout` and `connect_timeout` instead. timeout really deprecated? |
yes, will use what's your thriftpy version? |
@MrKiven |
I having the same problem. I ported my implementation of the Apache Python module. IT was working ok. I made a shell for it (stills using the Apache Python Module), that connects and send requests as client to the server and prints the response. But with Thriftpy after 3 seconds the client connects the connection crashes. I can create a new working connection though. Before the time out, it works fine.
I believe this is a bug. A there is no reason to a connection close after 3 seconds. Sometimes even network latency is longer than it. And for my example, the shell I made is supposed to receive commands from the user, at any time. Also, the canonical Apache implementation doesn't behave this way. I installed Thriftpy last night with pip: |
I changed the default from:
to:
I see I have the option to pass the timeout when creating a service manually. But the function By now, the simpler way to use
|
These 2 commits fixed it to me. I running tests and I will write some tests for it latter before I make pull request. Does this solutions sounds ok? |
Sorry for the late reply, the issue is because the You may now pass the If it doesn't resolve your issue, feel free to reopen this thread. |
Hello. I have thriftpy version 0.3.9 and collided with bug like @AllanDaemon report. As advised above, I replaced the value of client_timeout to None. And it worked. In this regard, I have a question. Maybe it makes sense to initially set the value to None? Thank you for attention. |
Hi,how can I set timeout in thriftpy?
I whrite like:
But error:
Thanks!
The text was updated successfully, but these errors were encountered: