mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 15:35:55 +03:00
[GH-ISSUE #582] Redis errors are not being returned to the caller on server run #280
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#280
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @edalford11 on GitHub (Dec 1, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/582
Originally assigned to: @hibiken on GitHub.
Describe the bug
Errors are not bubbled up to the caller when starting server. For example:
ERROR: cannot subscribe to cancelation channel: UNKNOWN: redis pubsub receive error: dial tcp: address redis.dev.xyz: missing port in addressTo Reproduce
Expected behavior
If an error happens such as not being able to connect to redis, the caller should be able to do what they need to do with that error. This is a problem because when I run this server in a container, the container continues to report as running with no issues, even though there are definitely issues.
@hibiken commented on GitHub (Dec 21, 2022):
Thank you @edalford11 for reporting this.
I see, I think redis backend is a "start-up critical" dependency of asynq server, so if the server cannot connect to redis on start up, it should fail (as you said). However, losing connection to redis shouldn't fail the server, since connection may get lost intermittently.
Incidentally, the current implementation of
Serverprovides thisHealthCheckFuncoption in the config, so you could provide a callback function to report server health.@edalford11 commented on GitHub (Jan 6, 2023):
I am using the HealthCheckFunc for running the periodic health checks, though its not sufficient for reporting the start up critical dependency errors such as a bad redis url.
@camillof commented on GitHub (May 12, 2023):
Hey @edalford11 were you able to implement a workaround?
I'm also interested in raising an error if the redis server is not ready when starting the asynq server.
@edalford11 commented on GitHub (May 17, 2023):
@camillof unfortunately I didn't. We are just hoping that no redis connection issues ever happen + check the logs every now and then to be sure. @hibiken would love to hear about if/when proper error handling for redis will be implemented so that users may properly handle these errors when they happen.