Nginx 504 Gateway timeout for operations running more than 30 sec
Self Checks
- [x] I have read the Contributing Guide and Language Policy.
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.9.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
- Query a Knowledge base app that uses LLM and using v1/chat-messages endpoint via HTTP to request information
- If your LLM and underlying infrastructure cannot answer fast ( < 30 sec) the conenction gives Nginx 504 Time out message and the related automation workflows end in Error
I searched for simillar issues, tried modifying nginx conf files - did not make sense. Please fix this or give a way to increase the time out value.
✔️ Expected Behavior
Having a way to increase time out to a custom value.
❌ Actual Behavior
Failure after 30 seconds of Dify app returning result via API.
Bump up the issue. Very announing one.
Bump - please add vaariables to control the timeout values of nginx... very annoying issue
Here are the Dify nginx node logs:
Hi, @ndrewpj. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.
Issue Summary:
- You reported that requests to the v1/chat-messages endpoint on self-hosted Dify v1.9.1 are timing out after 30 seconds with an Nginx 504 Gateway Timeout error.
- Attempts to adjust Nginx timeout settings have not resolved the issue.
- You requested the addition of configurable timeout variables to better manage Nginx timeouts.
- Relevant logs were provided to illustrate the problem.
- The issue remains unresolved.
Next Steps:
- Please let me know if this issue is still relevant with the latest version of Dify by commenting here.
- If I do not hear back within 15 days, I will automatically close this issue.
Thank you for your understanding and contribution!