Page 1 of 2
GatewayTimeout when pulling Availability report over 3 month
Posted: Tue Dec 20, 2016 1:08 pm
by nagmoto
Hi
On my 4.1.1 and 4.2.4 Nagios server, I can generate 3 months availability report for two months period,
using custom report period. But when I try over 3 months, I am getting following error message.
Code: Select all
Gateway Timeout
The gateway did not receive a timely response from the upstream server or application.
Following attempt to increase php socket timeout from 60 to 600 seconds didn't help either.
Code: Select all
[nagios@nagios03 ~]$ sudo grep ^default_socket /etc/php.ini
default_socket_timeout = 600
[nagios@nagios03 ~]$
In attached screenshot, 07/2016 to 10/2016 will failed with timeout while 07/2016 to 09/2016 period is ok.
Re: GatewayTimeout when pulling Availability report over 3 m
Posted: Tue Dec 20, 2016 1:28 pm
by avandemore
Did you restart Apache after making the change?
Re: GatewayTimeout when pulling Availability report over 3 m
Posted: Tue Dec 20, 2016 2:00 pm
by nagmoto
Yes. I restarted both nagios and httpd.
Re: GatewayTimeout when pulling Availability report over 3 m
Posted: Tue Dec 20, 2016 2:17 pm
by avandemore
To confirm, you are now seeing this error after 10 minutes of waiting?
Re: GatewayTimeout when pulling Availability report over 3 m
Posted: Tue Dec 20, 2016 2:21 pm
by nagmoto
I think it is shorter than 10 minutes until I got time out.
Will this timeout got logged somewhere in the file ?
Re: GatewayTimeout when pulling Availability report over 3 m
Posted: Tue Dec 20, 2016 2:24 pm
by nagmoto
I timed it, it was about 2 minutes.
Re: GatewayTimeout when pulling Availability report over 3 m
Posted: Tue Dec 20, 2016 2:32 pm
by avandemore
Re: GatewayTimeout when pulling Availability report over 3 m
Posted: Tue Dec 20, 2016 2:41 pm
by nagmoto
Masked log entry in /etc/httpd/logs/ssl_error_log
Code: Select all
[Tue Dec 20 13:26:34.488692 2016] [cgi:warn] [pid 27346] [client 192.168.1.150:55445] AH01220: Timeout waiting for output from CGI script /usr/lib64/nagios/cgi/avail.cgi, referer: https://nagios03.test.com/nagios/cgi-bin/avail.cgi?get_date_parts=&host=all
[root@nagios03 ~]#
Re: GatewayTimeout when pulling Availability report over 3 m
Posted: Tue Dec 20, 2016 2:51 pm
by avandemore
In /etc/httpd/httpd.conf please change from:
to
Code: Select all
#EnableMMAP off
EnableSendfile on
Timeout 600
Restart Apache and test.
Re: GatewayTimeout when pulling Availability report over 3 m
Posted: Tue Dec 20, 2016 3:14 pm
by nagmoto
"EnableSendfile on" was on already, I think "Timeout 600" in httpd.conf fixed the timeout issue.
Thanks. Please resolve this issue.