How to Increase Request Timeout in Apache

Last updated on August 10th, 2020 at 03:05 am

By default, request timeout in Apache 2.4 is 60 seconds. If you want to increase request timeout in Apache, you will need to use the TimeOut directive. Here’s how to increase request timeout in Apache.

 

How to Increase Request Timeout in Apache

Here are the steps to increase request timeout in Apache.

 

1. Open Apache configuration file

Open Apache configuration file in a text editor. You will find the Apache server configuration file located at one of the following locations, depending on your installation.

  • /etc/apache2/httpd.conf
  • /etc/apache2/apache2.conf
  • /etc/httpd/httpd.conf
  • /etc/httpd/conf/httpd.conf
$ sudo vi /etc/apache2/apache2.conf

If you have setup Apache virtual host, you can alternatively open virtual host file.

Bonus Read : How to Speed Up Apache Web Server

 

2. Increase Request Timeout in Apache

If you want to increase request timeout to 600 seconds, just add the following line to your Apache configuration file.

TimeOut 600

Bonus Read : How to Increase Apache Requests Per Second

 

3. Restart Apache Web Server

Restart Apache server to apply changes.

Ubuntu/Debian

$ sudo service apache2 restart

CentOS/Redhat/Fedora

$ sudo service httpd restart

Bonus Read : How to Install mod_wsgi on Ubuntu

 

Please note, sometimes it may be not enough to only increase request timeout in Apache. For example, if you are running a PHP site on your web server, you will also need to increase request timeout in php.ini file.

 

Ubiq makes it easy to visualize data in minutes, and monitor in real-time dashboards. Try it Today!