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

fix frontend 500 error when probing service #79

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Conversation

LeoQuote
Copy link
Contributor

dify frontend needs a header accept-language to properly respond, bug: langgenius/dify#3724

add more initial delay to prevent unnecessary check before frontend it ready

@LeoQuote LeoQuote merged commit 45c9bc6 into master Apr 23, 2024
1 check failed
@LeoQuote LeoQuote deleted the LeoQuote-patch-1 branch April 23, 2024 15:22
httpHeaders:
- name: accept-language
value: en
initialDelaySeconds: 30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initialDelaySeconds of 30 seconds is too long for the frontend's readinessProbe. Next.js starts up very quickly, usually completing within a few seconds. With initialDelaySeconds set to 30, it takes at least 30 seconds for the frontend to become available. reduce the initialDelaySeconds to 3 seconds?

Copy link
Contributor Author

@LeoQuote LeoQuote Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about making this configurable? I experienced unavailability for at least 20 seconds

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about making this configurable? I experienced unavailability for at least 20 seconds

In my case, the langgenius/dify-web container took less than one second to reach readiness after starting.

2024-04-24T06:17:49: PM2 log: Launching in no daemon mode
......
06:17:50 0|dify-web  |  ✓ Ready in 210ms

It's important to note that in Kubernetes, the time taken for container scheduling and image pulling is not included in the health check calculations.

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

Successfully merging this pull request may close these issues.

2 participants