For the time being, I want my app to be run on 5 servers, with one connection per each. When the number of users exceeds 5, I am fine with it not working for the 6th user.
I tried setting
[services.concurrency]
hard_limit = 1
soft_limit = 1
type = "connections"
(also tried type = “requests”) with no success. More than one connection is being opened on a single machine.
( I know this, because as of now, there are memory problems, and running more than one connection on the same isntance causes both to be OOM killed )
Update : all of a sudden it works as wanted, the number of max users being equals to the number of instances scaled to.
Is this “suddenly working” expected sometimes? Or, it can stop working suddenly as well?
There is a default health check that doesn’t pass through the proxy, though. If any connection causes that problem it’s probably the health check. It’s worth setting up a specific health check endpoint:
Now, even when I have downscaled it to one instance, the one instance does not open.
It throws
2022-09-14T17:48:43.323 proxy[c7cc1baa] fra [warn] Instance reached connections hard limit of 1
2022-09-14T17:48:46.009 proxy[c7cc1baa] fra [warn] Instance reached connections hard limit of 1
Immediately upon opening in browser (and does not work). What can be done?