Answer the question
In order to leave comments, you need to log in
Why docker server sometimes gives 504 error?
Hello, I started the server with Docker: docker run -p 8080:8080 project
It works fine, responds as needed, even from the Internet.
But when I use it from my Python application, which uses aiohttp to make requests asynchronously, I always or sometimes get a 504 error, and docker itself writes in the console: "Error handling request". Why is this happening and how to fix it?
The error is clearly due to the large number of requests sent immediately to the server with docker. Is he really that bad with the processing of such a volume? I would like to use this server as api...
Answer the question
In order to leave comments, you need to log in
As with a regular server, the container has performance limitations.
So look at the container logs, maybe it's in the app configuration. server, possibly in resources - CPU / RAM.
In the first case, the settings will help, in the second - you can increase the resources of the container or raise several containers with the loadbalancer.
504 usually means you've run out of workers. What is logical with a large number of parallel requests
Hmm, looks like something is broken.
project
контейнер не очень рабочийDidn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question