If you are using a cPanel server and have FastCGI enabled in Apache, you might be facing the following error which caused your website to hang or showing ’500 Internal Server Error’ message. When checking the error log '/usr/local/apache/logs/error_log, you will see something similar as below:
[warn] .. mod_fcgid: read data timeout in 40 seconds,
[error] .. Premature end of script headers: index.php
This is because mod_fcgid has reached the timeout in processing the parse data. So we need to increase some of the respective value:
1. Login to WHM > Apache Configuration > Include Editor > Post VirtualHost Include > All
2. Copy and paste the following code:
3. You will need to restart Apache after that. Your FastCGI timeout will be changed to 400 seconds. You can change the timeout according to the requirement.