13 Oct Database connection error on WordPress on AWS EC2
We have recently identified that Amazon EC2 instance is not very stable on memory allocation. Especially on the FREE tier EC2 micro instance, but still occasionally happening on EC2 small instance.
The behaviour of the issue is administrator cannot login into WordPress backend anymore, but most of the time the site is still up and running (might because of we have cache enabled?)
If you can still SSH to the instance, you might see the error like below:
tail -n 300 error_log | more
[Tue Oct 11 16:29:45.555168 2016] [mpm_prefork:error] [pid 2737] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
Let’s check the server memory usage?
We still have so much memory.
The only resolution we’ve found is reboot the EC2 instance