Skip to content

Wordpress website on Lightsail keeps dropping offline/unavailable

0

Hello,

I have had an ongoing problem with my Wordpress website using light sail. Every couple of days I get an email notification from my Jetpack plugin saying that my website is offline or unresponsive. Checking the website via both domain and public URL confirms the website cannot be reached. CPU usage is very low as the nite gets almost no traffic. I thought perhaps ai was under spec for Wordpress and migrated from an instance with 512MB of RAM to the 1GB and it happened again just a little bit ago.

I do have a distribution set up that may be unnecessary. I've also noticed that for such low traffic the instance seems to be outputting about 6MB per minute according to the metrics tab. I've checked logs as best I know how and can't find that my Wordpress install has been hacked or anything in any noticeable way.

Could really use some guidance on how to track down and fix what the potential problem could be.

asked 2 years ago545 views

4 Answers
0

Slamchez,

Your WordPress site's intermittent downtime on AWS Lightsail may be due to resource limitations of burstable instances, particularly memory shortages. Consider upgrading your instance's memory, enabling swap space, and reviewing plugins or themes for optimization. Checking Apache logs for high traffic patterns can also provide insights. You can find more details and recommendations in this GitHub issue

Hope this helps!.

EXPERT

answered 2 years ago

0

Thanks for the quick reply. I ran the tool per the GitHub link you provided. It doesn't seem to have found any issues with Wordpress itself. The tool does suggest more memory but I was under the impression that 1GB of memory would be more than enough for a small website. It also looks like someone tried to get at my server over night and was denied by Apache. I'm not sure this would cause the Lightsail instance to become unresponsive though.

Output pasted below.

===== Begin of bndiagnostic tool output =====

? Apache: Found possible issues
✓ Mariadb: No issues found
✓ Connectivity: No issues found
✓ Wordpress: No issues found
? Resources: Found possible issues
✓ Processes: No issues found
✓ Php: No issues found

[Apache]

Found recent error or warning messages in the Apache error log.

[Sat Aug 31 04:17:58.920123 2024] [authz_core:error] [pid 20318:tid 140133818844928] [client ip_address:33688] AH01630: client denied by server configuration: /opt/bitnami/phpmyadmin/index.php [Sat Aug 31 05:20:30.112644 2024] [authz_core:error] [pid 20318:tid 140135035295488] [client ip_address:54504] AH01630: client denied by server Press [Enter] to continue: configuration: /opt/bitnami/apache/cgi-bin [Sat Aug 31 06:59:33.505947 2024] [autoindex:error] [pid 21771:tid 140134020269824] [client ip_address:52698] AH01276: Cannot serve directory /opt/bitnami/wordpress/wp-admin/css/: No matching DirectoryIndex (index.html,index.html,index.htm,index.php) found, and server-generated directory index forbidden by Options directive, referer: binance.com

Please check the following guide to troubleshoot server issues:
 
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-erro
rs-apache/

[Resources]

Your instance has little available RAM memory.

total used free shared buff/cache available Mem: 961 537 63 45 361 232 Swap: 634 2 632

You could try to increase your instance's memory. Please check your cloud 
provider's documentation for more information.
 
Press [Enter] to continue:

===== End of bndiagnostic tool output =====

answered 2 years ago

0

Thank you for the additional information. It seems like the low available RAM is likely causing the issue. While not the ideal solution, you could set up a monitoring script to automatically restart the Bitnami services whenever an error is detected, preventing the site from going down. This can be done by checking for error patterns in the logs and triggering a restart if needed. Although increasing memory might be a better long-term solution, this workaround can help maintain site stability in the meantime. can help maintain site stability.

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

0

Sorry to follow up on this after so long but I've been trying to troubleshoot exactly what may be causing the system to run out of memory. I'm just trying to ensure that it is something that's either been corrupted on my instance or a configuration issue before moving to a larger instance.

I installed htop so that I could seemingly monitor system resource a little bit better and get a better handle on what's going on. It appears that almost 47 hrs on the dot after a restart of either Apache or the full instance, Apache is crashing. I have checked every log that I can think of and I cannot find a root cause. While admittedly memory seems tight (~350 -400 MB of 960 MB available) , there is no visible reason for this to happen. My Swap file is in the megabytes and seemingly rarely used if at all. CPU usage is generally low and never above a 20% burst, if that.

I spun up an EC2 instance based on a snapshot I took to see if that failed and as far as I could tell it did not. The only differences were that I did not point my domain at it and I did not allow Jetpack to operate as normal as I did not want it to potentially overwrite my current settings.

I'm at a loss as to what's going on.

Next steps are seeing if giving the snapshot a bigger 2GB instance to see if that helps.

The next thing would be to spin up a 2GB instance and start clean.

After that... EC2 again but this time Allow Jetpack to do whatever it needs.

I'm not sure what else to check or where else to go on to find the cause of the issue.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.