K
K
kkolorid2019-10-06 20:52:20
Python
kkolorid, 2019-10-06 20:52:20

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

3 answer(s)
V
Vitaly Karasik, 2019-10-07
@vitaly_il1

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.

S
Sergey Tikhonov, 2019-10-07
@tumbler

504 usually means you've run out of workers. What is logical with a large number of parallel requests

D
Dmitry Derepko, 2019-10-06
@xEpozZ

Hmm, looks like something is broken.

here is the answer
похоже, что project контейнер не очень рабочий

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question