Server hangs when receiving multiple requests at the same time


I have n8n running on AWS, and when I receive multiple requests at the same time (or within a few seconds), cpu usage goes through the roof and eventually the requests fail with code 522 - connection timed out. Is there anything I can do to avoid this?
In the last crash, I had received about 25 requests in a 2 second span.

Thanks for your help!


@cdesseaux the posts below should clarify. If not, simply get back to me.


how can I change the settings to ‘export EXECUTIONS_PROCESS=main’?

I can access my server via ssh, but i seem to only have access the docker-compose file in there.

sorry if this is really basic stuff, I’m kind of new at this.

Thanks for your help!

You can add another line underneath environment in your docker-compose.yml file:

The line would be: