My application is a websocket application and I can receive hundreds of connections at the same time.
The plan I chose is performance-4x 32GB ram.
I’m getting an error like this:
Instance XXXXXXXXX reached hard limit of 25 concurrent connections. This usually indicates your app is not closing connections properly or is not closing them fast enough for the traffic levels it is handling. Scaling resources, number of instances or increasing your hard limit might help.
What should i do ?
I have inserted some lines into the toml like:
[services.concurrency]
type = “connections”
hard_limit = 1000
soft_limit = 500
What does it mean ? May increase them whatever i want ? Please somebody help me.
I don’t want to get this error even if thousands of people connect.
Edit:
I increased the HTTP request limit, but it is currently timed out while connecting to your instance. this indicates a problem with your app (hint: look at your logs and metrics) I get such an error.
When the Fly proxy sends requests to your app, it will wait 60 seconds for a response. After that, you’ll see this error. Your app could be timing out for a number of reasons, such as slow database requests, or timeouts to other services that your app connects to.
If your application isn’t logging anything about these timeouts, check to make sure the clients for your target services (Postgres, etc) are configure to log when connection errors occur.