Gateway timeout exactly 30 seconds

Yes, I read threads with a similar problem here
https://forum.hestiacp.com/t/gateway-timeout/1607
and here
https://forum.hestiacp.com/t/webmail-with-gateway-timeout/2094
and here
https://forum.hestiacp.com/t/504-gateway-error-timeout/2432

My problem is that a slightly heavier page (a gallery that creates a thumbnail cache on first call) causes a gateway timeout in exactly 30 seconds. The same problem occurs when searching for messages by content in the roundcube.
I would like to find exactly where this 30 second time is in the configuration and increase it.
I am enclosing the times that occur in my configurations.

grep -ir timeout /etc/nginx/ /etc/php

/etc/nginx/nginx.conf:    client_header_timeout           180s;
/etc/nginx/nginx.conf:    client_body_timeout             180s;
/etc/nginx/nginx.conf:    send_timeout                    180s;
/etc/nginx/nginx.conf:    keepalive_timeout               90s;
/etc/nginx/nginx.conf:    fastcgi_connect_timeout         120s;
/etc/nginx/nginx.conf:    fastcgi_read_timeout            300s;
/etc/nginx/nginx.conf:    fastcgi_send_timeout            180s;
/etc/nginx/nginx.conf:    fastcgi_cache_lock_timeout      5s;
/etc/nginx/nginx.conf:    proxy_connect_timeout           120s;
/etc/nginx/nginx.conf:    proxy_read_timeout              300s;
/etc/nginx/nginx.conf:    proxy_send_timeout              180s;
/etc/nginx/nginx.conf:    ssl_session_timeout 60m;
/etc/nginx/nginx.conf:    resolver_timeout    5s;
/etc/nginx/nginx.conf:    proxy_cache_use_stale error timeout invalid_header http_502;
/etc/nginx/nginx.conf:    fastcgi_cache_use_stale updating error timeout invalid_header http_500 http_503;
/etc/php/7.4/fpm/php-fpm.conf:;process_control_timeout = 0
/etc/php/7.4/fpm/pool.d/dummy.conf:pm.process_idle_timeout = 10s
/etc/php/7.4/fpm/pool.d/mydomain.conf:pm.process_idle_timeout = 10s
/etc/php/7.4/fpm/pool.d/www.conf:pm.process_idle_timeout = 10s
/etc/php/7.4/fpm/pool.d/www.conf:request_terminate_timeout = 90s
/etc/php/7.4/fpm/php.ini:; Default timeout for socket based streams (seconds)
/etc/php/7.4/fpm/php.ini:; http://php.net/default-socket-timeout
/etc/php/7.4/fpm/php.ini:default_socket_timeout = 60
/etc/php/7.4/fpm/php.ini:; Timeout for network requests in seconds.
/etc/php/7.4/fpm/php.ini:;mysqlnd.net_read_timeout = 31536000
/etc/php/7.4/fpm/php.ini:; http://php.net/oci8.persistent-timeout
/etc/php/7.4/fpm/php.ini:;oci8.persistent_timeout = -1
/etc/php/7.4/fpm/php.ini:;opcache.force_restart_timeout=180
/etc/php/7.4/cli/php.ini:; Default timeout for socket based streams (seconds)
/etc/php/7.4/cli/php.ini:; http://php.net/default-socket-timeout
/etc/php/7.4/cli/php.ini:default_socket_timeout = 60
/etc/php/7.4/cli/php.ini:; Timeout for network requests in seconds.
/etc/php/7.4/cli/php.ini:;mysqlnd.net_read_timeout = 31536000
/etc/php/7.4/cli/php.ini:; http://php.net/oci8.persistent-timeout
/etc/php/7.4/cli/php.ini:;oci8.persistent_timeout = -1
/etc/php/7.4/cli/php.ini:;opcache.force_restart_timeout=180

I would be grateful for any suggestions.

If you have the default install Apache2 also has a timeout of 30 sec

And it sounds like this is is the issue

1 Like

Great, thanks a lot!

grep -ir timeout /etc/apache2/

/etc/apache2/apache2.conf:Timeout 180
/etc/apache2/apache2.conf:KeepAliveTimeout 10
/etc/apache2/mods-available/ssl.conf:	#   to use and second the expiring timeout (in seconds).
/etc/apache2/mods-available/ssl.conf:	SSLSessionCacheTimeout  300
/etc/apache2/mods-available/reqtimeout.load:LoadModule reqtimeout_module /usr/lib/apache2/modules/mod_reqtimeout.so
/etc/apache2/mods-available/reqtimeout.conf:<IfModule reqtimeout_module>
/etc/apache2/mods-available/reqtimeout.conf:	RequestReadTimeout header=20-40,minrate=500
/etc/apache2/mods-available/reqtimeout.conf:	RequestReadTimeout body=10,minrate=500
/etc/apache2/mods-available/fcgid.conf:  FcgidConnectTimeout 20

yes, that is the first line, after set 180 gallery works well.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.