AWS The Timeout Specified Has Expired

A CRAZY error was appearing on my AWS EC2 apache server log. So I tried to work out why it was happening and fix it.

AWS EC2 apache server log

SOLUTION: See section below on

sudo /opt/bitnami/ restart



$ sudo apt-get update

$ sudo apt-get install unzip

$ sudo apt-get install libwww-perl libdatetime-perl

curl -O
cd aws-scripts-mon

cd aws-scripts-mon

./ –mem-util –verify –verbose

AWS EC2 apache server log

ec2 error proxy_fcgi:error”
“EC2 disable APC extension”

AWS EC2 apache server log

vi php.ini
Go to the bottom of the file (capital G if you don’t use vi regularly, and press i to begin inserting code)
Comment out the line about “”
Write in a line about “”

Save and quit by pressing Esc -> :wq (enter)
type in “sudo /opt/bitnami/ restart”


But then its down again… 20 min later…

AWS EC2 apache server log

“linux Disable php_fpm”

ps aux | grep php

AWS EC2 apache server log

Changed maxChild and maxWorkers to 50 (from 5)

apt-get install php5-fpm

apt-get remove libapache2-mod-php5


Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *