You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The health check for the worker added in v1.2.0 can get blocked by long running jobs, since it relies on the job queue to get an "ack" from the worker.
To Reproduce
Steps to reproduce the behavior:
Trigger some long-running jobs up to the limit of concurrency
Make a request to the /health endpoint
The 'check-worker-health' job will be blocked, waiting for the other jobs to complete before it is taken off the queue.
After 10 seconds the health check will time out and Vendure thinks the worker is dead.
Expected behavior
The health check should always return the correct result.
Environment (please complete the following information):
@vendure/core version: 1.2.0
The text was updated successfully, but these errors were encountered:
I know that for some users, a worker health check is not really needed because they monitor the worker process/container independently using the hosting infrastructure. Want to get some more opinions and experiences with this to guide how I handle this. Thanks! 🙏
Answer 1
Well, We're probably going to run the worker in a separate CloudRun container, so we won't need that.
Answer 2
Yes, have this on prod/dev while reindexing, but then up the concurrency of worker
No, it is not valuable
Now we get ack from worker. Maybe worker can sent ack?
Answer 3
I also ran into the issue while reindexing
I can get by without it. I have a keep-alive thing on my server that pings the app every 5 mins.
I have just been exploring ways to mitigate this issue and have come to the conclusion that the entire health check should probably be removed. Reasons:
I cannot see a good solution to the inherent problem of checking health by queuing a job which can get blocked.
The /health endpoint of the server will show "down" if the worker is down. This is probably not wanted. The server health check should be independent of the worker.
The health check job spams the job queue.
This will technically be a breaking change but I think we could consider it "reverting a failed experiment" in the next minor release.
edit: actually it would be better to keep it in for now, deprecate it but allow it to still be switched off/on by some kind of configuration.
Describe the bug
The health check for the worker added in v1.2.0 can get blocked by long running jobs, since it relies on the job queue to get an "ack" from the worker.
To Reproduce
Steps to reproduce the behavior:
/health
endpoint'check-worker-health'
job will be blocked, waiting for the other jobs to complete before it is taken off the queue.Expected behavior
The health check should always return the correct result.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: