Answer the question
In order to leave comments, you need to log in
How to defeat upstream timed out (110: Connection timed out)?
Good day!
Tell me how you can win
021/04/06 12:27:51 [error] 18610#18610: *38741 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 46.98.107.68, server: ****.com.ua, request: "GET /shop/api/****/products/ HTTP/1.1", upstream: "uwsgi://unix:///home/********.uwsgi/sock", host: ********"
location / {
uwsgi_pass unix:///*******/dj/*****.com.ua/.uwsgi/sock;
include uwsgi_params;
client_body_timeout 1800s;
uwsgi_connect_timeout 15s;
uwsgi_read_timeout 1800s;
uwsgi_send_timeout 1800s;
proxy_send_timeout 900s;
proxy_read_timeout 900s;
send_timeout 600;
}
[uwsgi]
log-format = {VSZ: %(vsz)/%(vszM)M}{RSS: %(rss)/%(vszM)M} [pid: %(pid)|app: -|req: -/-] %(addr) (%(user)) {%(vars) vars in %(pktsize) bytes} [%(ctime)] %(method) %(uri) "%(proto)" %(status) %(rsize) bytes in %(msecs) msecs %(headers) headers in %(hsize) bytes (%(switches) switches on core %(core)) %(var.HTTP_X_REQUEST_ID)
stats = /home/%c/dj/%n/.uwsgi/stats.sock
socket = /home/%c/dj/%n/.uwsgi/sock
chmod-socket = 660
chgrp-socket = www-data
workers = 4 # maximum number of workers
cheaper-algo = spare2
cheaper = 2 # tries to keep 2 idle workers
cheaper-initial = 2 # starts with minimal workers
cheaper-step = 1 # spawn at most 2 workers at once
cheaper-idle = 10 # seconds
enable-threads = true
uid = %c
gid = www-data
env = LC_ALL=ru_RU.utf8
wsgi-file = /home/%c/dj/%n/code/src/project_src/wsgi.py
chdir = /home/%c/dj/%n/code/src
home = /home/%c/dj/%n/.venv
master=true
vacuum = true
memory-report = true
evil-reload-on-rss = 1024
harakiri = 1200
max-requests = 5000
buffer-size = 65535
post-buffering = 8192
touch-reload = %(wsgi-file)
daemonize2 = /home/%c/dj/%n/.uwsgi/log
pidfile2 = /home/%c/dj/%n/.uwsgi/pid
# disable IOError: write error, in Sentry
ignore-sigpipe = true
ignore-write-errors = true
disable-write-exception = true
Answer the question
In order to leave comments, you need to log in
look at and increase the timeout directive for nginx, I think the problem is there - nginx.org/en/docs/http/ngx_http_proxy_module.html#...
besides, the information flow is not entirely clear - do you process the 1C database using Django Rest? How is the request going?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question