Skip to content
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

rpc error: code = Canceled desc = context canceled #4564

Closed
feyounger opened this issue Jan 13, 2025 · 7 comments
Closed

rpc error: code = Canceled desc = context canceled #4564

feyounger opened this issue Jan 13, 2025 · 7 comments

Comments

@feyounger
Copy link

feyounger commented Jan 13, 2025

Describe the bug
I have a client and server service, and when the client requests the server, it reports an error timeout. My client service setting corresponds to a server service timeout of 0, which I believe means there is no limit to timeouts. But in reality, after 60 seconds of execution, the client reported an error timeout and the server continued to execute.
Actually, my server service takes about 5 minutes, so let's not consider why we don't use asynchronous or other solutions for now.

To Reproduce
Steps to reproduce the behavior, if applicable:

  1. client.yaml
Rpc:
 Endpoints:
   - rpc:8080
 Timeout: 0
  1. client error
rpc error: code = Canceled desc = context canceled 

Environments (please complete the following information):

  • OS: [e.g. Linux]
  • go-zero version [e.g. 1.6.6]
  • goctl version [e.g. 1.4.0, optional]
@kesonan
Copy link
Collaborator

kesonan commented Jan 15, 2025

Have you check the timeout of upstream application, check the context timeout.

@feyounger
Copy link
Author

I did check the context of the API layer and did not impose any timeout restrictions

@kesonan
Copy link
Collaborator

kesonan commented Jan 15, 2025

I did check the context of the API layer and did not impose any timeout restrictions

Have you join in wechat group, pls at me and I'll check with you on lark.

@feyounger
Copy link
Author

I am already in a WeChat group, how can I find you

@kesonan
Copy link
Collaborator

kesonan commented Jan 15, 2025

I am already in a WeChat group, how can I find you

@KE_SON_AN

@adamqddnh
Copy link

If u didn't configure a timeout and it times out at 60 seconds, maybe u can check other gateway config, such as nginx, cuz 60s looks like a default gateway timeout config

@feyounger
Copy link
Author

If u didn't configure a timeout and it times out at 60 seconds, maybe u can check other gateway config, such as nginx, cuz 60s looks like a default gateway timeout config

Thank you for your suggestion. I tested it carefully and indeed nginx timed out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants