How can I increase max concurrent request of Phoenix on fly.io?

I made a toy project that provides a simple API for testing.

https://json.media/test_api

This project is served via fly.io.
Here is my fly.io configuration below. I configured services.concurrency.hard_limit to 10000.

I wanted to do a load test for this project. Below is the code I used for the load test.

When I run the code that tests with req, about 200 requests returns ok and other requests returns error %Mint.TransportError{reason: :closed}.

How can I increase max concurrent request of Phoenix on fly.io?

Are you sure it’s the currency limit you run into and not the instance(s) being overwhelmed?

There was a discussion about this on the fly.io community forum a few days ago max concurrency can not be greater than 300 - #4 by fxsjy - Fly.io

I think that the issue is exactly what you’re experiencing here, and was answered by the fly team.

2 Likes