简体   繁体   中英

How can I increase the amount of time apache waits before timing out an HTTP request?

Occasionally when a user tries to connect to the myPHP web interface on one of our web servers, the request will time out before they're prompted to login.

Is the timeout time configured on the server side or within their web browser?

Can you tell me how to increase the amount of time it waits before timing out when this happens?

Also, what logs can I look at to see why their request takes so long from time to time?

This happens on all browsers. They are connecting to myPHP in a LAMP configuration on CentOS 5.6.

Normally when you hit a limit on execution time with LAMP, it's actually PHPs own execution timeout that needs to be adjusted, since both Apache's default and the browsers' defaults are much higher.

Edit: There are a couple more settings of interest to avoid certain other problems re: memory use and parsing time, they can be found at this link .

Typically speaking, if PHP is timing out on the defaults, you have larger problems than the timeout itself (problems connecting to the server itself, poor coding with long loops).

Joachim is right concerning the PHP timeouts though, you'll need to edit the php.ini to increase the timeout of PHP itself before troubleshooting anything else on the server; however, I would suggest trying to find out why people are hitting the timeout in the first place.

max_execution_time = 30;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM