Trick for Apache2 and MySQL Crashing on High Load / Apache Benchmark

In the past, I have given some thought to a high load but not very much. For the most part having Lighttpd and Varnish in front of my Web servers alleviates most problems. That is until the other day when I decided to do an Apache benchmark test on my system and was able to bring down the server. The load made MySQL go insane by inflating it to 200% CPU usage! To make my servers available again I had to basically restart MySQL. This is not a huge issue, mainly because we do not have a high load but it was concerning.… Read More

Stop Crontab from Sending Emails

This week I was starting to get fed up with Crontab and it always sending me emails regarding jobs. I have log files setup and prefer to look at my logs for errors vs crontab flooding my inbox. I never can seem to remember the 2>&1 trick, as I do not constantly use crontab. So I went exploring in the manual and found a nice little track to stop crontab from flooding your sever mail file with mail. Simply put MAILTO='' at the top of your crontab and you are set. No more trying to remember the tricky 2>&1 or any other weird hacks.… Read More

Varnish is Running out of Control!

A slug walking across a keyboardMy servers now a days run Varnish simply for the speed. On my main site Varnish was getting out of control with the RAM / Memory usage. Varnish would slowly creep up and eat all the memory, even though I was trying to hack Varnish to only use 128MB of ram, especially since the site is hosted on a lowendbox by Frantech (Buyvm.net). The answer, which I am not really sure WHY it works, but inside of vcl_fetch in the /etc/varnish/*.vcl file, I had set beresp.grace to be 30M, I tried this with 2M as well, but ultimately I took out the grace period setting and now my box is running Varnish with Lighttpd and PHP-FPM getting around 15k-30k unique hits a day and not going over 156MB of RAM usage.… Read More

↑ BACK TO THE TOP ↑