-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grpc channel stub cannot end request when timeout exceed,eg:timeout=30ms,request ended after 200ms #36712
Comments
Any help? @gnossen @XuanWang-Amos @hassox @beccasaurus |
@johnsondeng I wasn't able to repro the issue setting up a simple server against your client. Please provide the server side script also to be able to repro this issue. If possible a docker image with your server/client setup. |
@sourabhsinghs The code and dockerfile is in zip attach files. I build a simple image for this issue, and can still repro the issue after run the client for 5min. Please give help, the problem show impact on out production server for long time. dockerfile
|
Can anyone help? @gnossen @sourabhsinghs @XuanWang-Amos |
@johnsondeng , i have tried again to repro this issue with suggested setup. these are my findings.
Do you have any suggestion on why we are unable to see similar delays ? Did another test to see constant overhead for timeout delay . sharing graph for that also. |
@sourabhsinghs I produce a histogram too, it seems like that requests which time cost > 60ms is more than yours. I think maybe hardware diff? My container is running on Mac M1. But my question is, why the request > 60ms cannot end requests in 50ms(timeout params setting in rpc call)。 Your histogram above also shows 64 request in (60, 70]。The timeout is very inaccurate。 0.00 - 10.00: 0 |
@johnsondeng In data you've shared looks like 99.794% of RPCs (125234/125492) ends in 50.00 - 60.00 ms. Latency in rest of the RPC can be attributed to Hardware / GIL / Network etc. |
What version of gRPC and what language are you using?
python
grpcio 1.54.0
grpcio-tools 1.54.0
What operating system (Linux, Windows,...) and version?
linux
What runtime / compiler are you using (e.g. python version or version of gcc)
Python 3.10.14 (main, May 6 2024, 19:42:50) [GCC 11.2.0] on linux
What did you do?
Just write a grpc client multit-thread demo, set the timeout 30ms for per request, and grpc server "10.155.1.127:1234" will always sleep for 60ms. So what to be expected should be that all requests end with timeout exceed in 30ms. But Actually, after lots of request time sended and grep elapsed time to stastics, many request cost much more than 30ms.
grpc_server/demo_client.py
Run the program
nohup python grpc_server/demo_client.py
for nearly 5 min, and print the time cost of top 10 longest requestWhat did you expect to see?
All request ended in 30ms
What did you see instead?
Some requests ended in 100ms+.
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
See TROUBLESHOOTING.md for how to diagnose problems better.
Anything else we should know about your project / environment?
The text was updated successfully, but these errors were encountered: