Comments (5)
Also it is worth noting that Go routines value is also high anycable_go_goroutines_num=6983.
The number of goroutines is O(N) of the number of connections. That means, the connections are still "alive" from the anycable-go server perspective (and thus, the metrics look correct).
You turned off the traffic, but the ingress (load balancer) itself was running, right? It could still keep connections to the backend (anycable-go), thus, making them look alive.
For how long have you been monitoring anycable-go after dropping services? Another hypothesis is that the connections got stuck in a half-closed state (due to non-client initiated disconnect), and they could stay in this state for dozens of minutes (depending on the OS tcp settings, see https://docs.anycable.io/anycable-go/os_tuning?id=tcp-keepalive).
from anycable-go.
Hi @palkan, and thank you for your response.
I just want to clarify that what happened is that we physically deleted the ALB to make sure there is no traffic going to the affected instance, that is why we were surprised to see number of clients not changing.
After deleting the ALB, we monitored the instance for 24-hours and no change happened.
Another hypothesis is that the connections got stuck in a half-closed state (due to non-client initiated disconnect), and they could stay in this state for dozens of minutes (depending on the OS tcp settings, see https://docs.anycable.io/anycable-go/os_tuning?id=tcp-keepalive).
Inspecting the OS, here are the variables:
net.ipv4.tcp_keepalive_intvl = 75
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_keepalive_time = 7200
Correct me if I'm wrong, but according to this, I think after ~2hours and a minute or so, number of clients should drop, which was not the case from our monitoring.
from anycable-go.
number of clients should drop, which was not the case from our monitoring.
Yeah, it should.
Just to confirm: you see the fresh data points in the monitoring system reflecting the huge numbers of goroutines/connections (not some interpolation)?
The goroutines_num
value is updated periodically and highly unlikely to show stale system information. So, something happens at the connection handling layer. Do you have any logs (at the time you shut down the load balancer)?
from anycable-go.
No, unfortunately we don't have the logs.
What we did is that we implemented a monkey-patch by using keepAlive
probe in the pod for anycable-go
.
The probe sends a WebSockets connection to localhost
with a specific timeout.
If the timeout is reached (i.e. most probably disconnect_queue
and goroutines_num
are high), the pod will restart.
Not a perfect solution, but it gets the job done 😄
from anycable-go.
Closing as stale
from anycable-go.
Related Issues (20)
- Client cannot reconnect after going to sleep HOT 10
- GRPC max message size HOT 4
- JWT auth enhancements HOT 1
- TurboDrive/TurboStream Subscribe/Unsubscribe Race Condition HOT 16
- readme shows invalid "go get" command HOT 1
- became root HOT 3
- Cookies filter HOT 3
- Hide `Disconnect error: grpc connection is not ready` message HOT 1
- Unable to run it's docker image on M1 Mac
- Latest docker image missing GLIBC_2.29 HOT 6
- Feature Request: TLS on rpc service HOT 1
- Panic during history retrieval HOT 4
- Panic during history retrieval with 1.4.2 fix HOT 3
- Anycable-go ignores Redis database number HOT 1
- Failed to install by source HOT 2
- Posthog HOT 1
- Support redis socket url? HOT 11
- Intermittent GoAway Error with ENHANCE_YOUR_CALM Code in AnyCable-Go 1.4.8 Despite Functional Setup HOT 1
- WRN Using a non-distributed broadcaster without a pub/sub enabled HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anycable-go.