B
B
Boris the Animal2020-01-19 17:12:22
Nginx
Boris the Animal, 2020-01-19 17:12:22

keepalive_timeout 360 doesn't work, connection closes after 60 seconds. How to make it hold 360 seconds?

Nginx is used as a proxy.
Log in browser

GET http://my-domain.ru/api/search?query=one%20two%20three 504 (Gateway Time-out)

http {
  keepalive_timeout 360;
}

nginx -s reload
and even
systemctl stop nginx
systemctl start nginx

I was doing
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/nginx.service.d
           └─override.conf
   Active: active (running) since Sun 2020-01-19 16:50:10 MSK; 24min ago
     Docs: man:nginx(8)
  Process: 2657 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited,
  Process: 2686 ExecStartPost=/bin/sleep 0.1 (code=exited, status=0/SUCCESS)
  Process: 2682 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
  Process: 2673 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
 Main PID: 2685 (nginx)
    Tasks: 2 (limit: 1145)
   CGroup: /system.slice/nginx.service
           ├─2685 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
           └─2689 nginx: worker process

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wexter, 2020-01-20
@Casper-SC

504 (Gateway Time Out)

your backend is timed out. write the appropriate parameters proxy_read_timeout/proxy_send_timeout

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question