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

redis: connection pool timeout #3799

Closed
kurtmc opened this issue Feb 15, 2021 · 6 comments
Closed

redis: connection pool timeout #3799

kurtmc opened this issue Feb 15, 2021 · 6 comments
Assignees
Labels
bug Something isn't working c/network server This is related to the Network Server in progress We're working on it
Milestone

Comments

@kurtmc
Copy link
Contributor

kurtmc commented Feb 15, 2021

Summary

After some time running lorawan we will see that the network traffic to our redis instance drops off and a large number of errors being reported by the lorawan application. Restarting the lorawan application resolves the issue.

Steps to Reproduce

We can only reproduce this issue in our production environment, so I suspect you need to have a lot of traffic on lorawan to run into this issue.

lorawan-config.txt

What do you see now?

INFO Finished unary call                      duration=4.0002s error=error:pkg/networkserver:device_not_found (device not found) error_cause=error:pkg/redis:store (store error) error_cause_cause=redis: connection pool timeout error_correlation_id=24679b61b592424c878b8431762cbd3d error_name=device_not_found error_namespace=pkg/networkserver grpc.method=HandleUplink grpc.service=ttn.lorawan.v3.GsNs grpc_code=NotFound namespace=grpc peer.address=pipe request_id=01EYGW2NE7WAR03JD917NGNKRG

What do you want to see instead?

...

Environment

/ $ ttn-lw-cli version
The Things Network Command-line Interface: ttn-lw-cli
Version:             3.10.7
Build date:          2021-01-14T12:34:23Z
Git commit:          ecf52d6
Go version:          go1.15.6
OS/Arch:             linux/amd64
/ $ ttn-lw-stack version
The Things Stack for LoRaWAN: ttn-lw-stack
Version:             3.10.7
Build date:          2021-01-14T12:34:23Z
Git commit:          ecf52d6
Go version:          go1.15.6
OS/Arch:             linux/amd64

How do you propose to implement this?

I think there is a leak related to the redis connection pool. I am unsure how to fix it.

How do you propose to test this?

...

Can you do this yourself and submit a Pull Request?

...

@johanstokking johanstokking added this to the February 2021 milestone Feb 15, 2021
@johanstokking johanstokking added bug Something isn't working c/network server This is related to the Network Server labels Feb 15, 2021
@johanstokking
Copy link
Member

I believe this is fixed with #3704 but it isn't part of a 3.10 release yet. We're releasing 3.10.10 today.

@rvolosatovs I triaged the issue but if you feel confident that this is resolved, please close.

@rvolosatovs rvolosatovs added the in progress We're working on it label Feb 19, 2021
@virtualguy
Copy link
Contributor

We are still seeing this in 3.10.10

@htdvisser htdvisser modified the milestones: February 2021, March 2021 Mar 1, 2021
@johanstokking johanstokking modified the milestones: March 2021, v3.11.2 Mar 1, 2021
@rvolosatovs rvolosatovs modified the milestones: v3.11.2, v3.11.3 Mar 3, 2021
@rvolosatovs
Copy link
Contributor

@adriansmares do you have any input here based on your research of go-redis library bugs? Can this be related?

@adriansmares
Copy link
Contributor

@adriansmares do you have any input here based on your research of go-redis library bugs? Can this be related?

I've posted my findings here.

TLDR: Could be, but I cannot tell. The connection reaper bug could be old, and cause this issue (the one we're in right now), or it could be new and introduced as part of the v8.4.1 release, and then it's probably unrelated.

@rvolosatovs
Copy link
Contributor

Possibly ref redis/go-redis#1657

@rvolosatovs rvolosatovs modified the milestones: v3.11.3, v3.11.4, 2021 Q2 Mar 16, 2021
@kurtmc
Copy link
Contributor Author

kurtmc commented Mar 22, 2021

Looks like this is resolved in v3.11.2, we have been running for about 6 days and have not run into this redis issue.

@kurtmc kurtmc closed this as completed Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c/network server This is related to the Network Server in progress We're working on it
Projects
None yet
Development

No branches or pull requests

6 participants