-
Notifications
You must be signed in to change notification settings - Fork 2k
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
"Your IP is issuing too many concurrent connections" with server UI behind proxy #15471
Comments
Hi, I'm also facing this issue using apache as a reverse proxy to Nomad ui and api.
Thanks |
Hi @shoeffner! The configuration documentation for those limits can be found under So for your setup you'll want to set That being said, you might also want to take a look at your Fabio configuration. I'm not super familiar with Fabio but I wouldn't expect a load balancer to open new connections to the upstream for every single incoming request. |
Hi @tgross, thanks for pointing me to the docs, I couldn't find it back then. That should close this issue. We discussed all of this back and forth and decided that a better long-term solution is to remove fabio from the loop and use Consul DNS to directly point at the Nomad servers, which will then be able to properly rate limit the clients etc. But in the meantime, I will configure the http and rpc max connections, thank you very much! We will update to 1.5.0 "soonish", we still need to evaluate the new SSO vs our own custom login solution (problems we faced with Vault as a token issuer are detailed in hashicorp/vault#16183). But we will certainly keep an eye out for the Task API. |
This is related to #19212 |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
For a few months (at least October, but probably earlier) we are routinely getting
429 Too Many Requests: Your IP is issuing too many concurrent connections, please rate limit your calls
, especially when navigating the UI, which seems to be thrown bynomad/command/agent/http.go
Lines 269 to 296 in ee2f3e4
However, this behavior (not the error, but the rate limiting) causes troubles with our setup: You can see from the logs all connections to our nomad come from 127.0.0.1, as we proxy the connections through Fabio. I assume that Nomad could handle way more connections, since the limit specifies "Your IP", and in our case, every call has the same IP:
I found
nomad/nomad/structs/config/limits.go
Line 27 in 171ca52
I am not even sure the settings are used by the code in question, although they seem to be set at
nomad/command/agent/http.go
Lines 281 to 283 in ee2f3e4
But the rate limiter has a hard-coded
100
a few lines above that.How do you handle deployments behind a proxy? Or should we simply not deploy Nomad behind proxies? Or can Nomad use headers such as X-Forwarded-For, Forwarded, etc. to check the connections?
Nomad version
Output from
nomad version
Nomad v1.4.2 (f0c64605666324e886377ab897085a015a10a58c+CHANGES)
(We have a custom patch for some mount options, hence the commit might not be accurate -- but this issue is very likely unrelated)
Operating system and Environment details
Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-131-generic x86_64)
We proxy the Nomad UI through fabio.
Issue
We get rate limited due to our proxy making too many requests to the Nomad server.
Reproduction steps
Deploy Nomad behind a proxy and fire up multiple connections to it, best from different IP addresses to see the impact.
Expected Result
Normal use of the UI should not come to a halt because many users are seen as the same user.
Actual Result
Rate limiting is shared among all users.
Job file (if appropriate)
n/a
Nomad Server logs (if appropriate)
Nomad Client logs (if appropriate)
n/a
The text was updated successfully, but these errors were encountered: