Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Exit gracefully if unable to connect to the Redis #20

Open
chefsale opened this issue Nov 9, 2021 · 1 comment
Open

Exit gracefully if unable to connect to the Redis #20

chefsale opened this issue Nov 9, 2021 · 1 comment

Comments

@chefsale
Copy link

chefsale commented Nov 9, 2021

Currently if you provide an IP address which cannot be connected to

RedisStoreActor::from(RedisStore::connect("redis://1.1.1.1")).start()

the process still continues on and requests just timeout without a response.

@chefsale
Copy link
Author

chefsale commented Nov 9, 2021

It seems like it does exit once disconnected:

[2021-11-09T19:55:53Z TRACE mio::poll] deregistering handle with poller
[2021-11-09T19:55:53Z ERROR actix_ratelimit::stores::redis] Error connecting to redis: Connection timed out (os error 110)
[2021-11-09T19:55:53Z INFO  actix_ratelimit::stores::redis] Connected to redis server
[2021-11-09T19:55:53Z DEBUG actix_ratelimit::stores::redis] Incoming connection does not exists
[2021-11-09T19:55:53Z ERROR actix_ratelimit::stores::redis] could not get redis store address
Actor hanling the connection
Not Connected to the Redis DB

The problem is that it just takes too long, how can I reduce the timeout period?

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

No branches or pull requests

1 participant