Apache web server timeout after 60 seconds
Asked Answered
T

1

9

I am experiencing timeout after 60 seconds for apache web server + php running in IBM softlayer.

These are my settings (httpd server restart after these settings)

httpd.conf  
TimeOut 300
Timeout 300

* tried both at the same, also single entry of TimeOut and Timeout only.

php.ini
max_execution_time = 300  

PHP code:

<?php
set_time_limit(10000);  //Just to make sure
sleep(70);
echo "Successful";
?>  

Using Command Prompt

php test.php  

Result is Successful

Using different browsers (Chrome, Firefox and Safari)

http://mysite/test.php    

Result : Timeout exactly at 60 seconds!

Logs

php_error.log and httpd error_log
No errors!

I've found similar articles about this, but everybody is pointing at max_execution_time and Timeout. So far, no help.
Thanks a lot!

Tumer answered 4/8, 2017 at 3:57 Comment(5)
TimeOut and not TimeoutSchuss
Yes, typo - should be TimeOut.Tumer
tried both at the same, also single entry of TimeOut and Timeout only. Still no luckTumer
Had the same issue. The problem on my side was a load balancer timeout. We're using AWS load balancer and it's default timeout was 60 seconds, this was a pain to catch, hope it could help others.Henley
@Henley this is incredible. I have no idea how you caught that error, but same for us. Cheers mate.Ursala
I
4

many limitation are exists in php and apache server too

1. Apache limits:

find httpd.conf in your apache server : 

 c:\WampDeveloper\Config\Apache\extra\httpd- default.conf

and change limits:

    Timeout 300
    max_execution_time = 300

2. php.ini:

    upload_max_filesize = 256M
    post_max_size = 257M
    memory_limit = 258M
    max_input_time = 300
    max_execution_time = 300

After making all changes, restart your Apache server. I hope it was helpful.

Ischium answered 4/8, 2017 at 5:11 Comment(1)
Apache configuration file is httpd.conf or apache2.confBuster

© 2022 - 2024 — McMap. All rights reserved.