GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   server experts: varnish crashing and taking my websites down with it (https://gfy.com/showthread.php?t=1033292)

Socks 08-08-2011 12:40 AM

server experts: varnish crashing and taking my websites down with it
 
Every once in a while I'll have a huge HD spike that takes my websites offline, a "swap death spiral". Varnish seems to be the culprit, as I can manually get the websites back up by restarting memcached, varnish and apache. When varnish restarts it says "shutting down: failed!" so I assume it's the problem.

Anyways short of figuring out what the actual problem is, I'd like to just find a workaround so that I don't have to worry about hours of downtime between crash and me realizing things are down.

I guess I could put something in cron that used lynx to hit my websites and if it didn't get a response it would go ahead and restart the three processes?

Someone mind typing out what I'd put in cron for me to do that, or other ideas perhaps?

darksoul 08-08-2011 01:29 AM

http://www.nagios.org/

V_RocKs 08-08-2011 01:35 AM

First off... How much traffic is causing this to happen?

Is the server running suPHP? This can cause it to tax the fuck out of itself and should only be used on virtual boxes.

Babaganoosh 08-08-2011 06:10 AM

Don't do the cron job. You'd just be putting a bandage on the real problem. Consult your server logs and see what they're saying around the time things go to shit.

If you can catch it happening, run top to find what's eating all of the memory.

https://www.varnish-cache.org/trac/wiki/Performance might give you some help too.

barcodes 08-08-2011 06:32 AM

You could try something like this also if that Nagios solution doesn't work for you for whatever reason.
http://www.catswhocode.com/blog/how-...rver-using-php

Another solution would be a paid service like this, http://aremysitesup.com.

rowan 08-08-2011 07:23 AM

What OS?

Is it possible you've allocated a little too much memory to one or more things, so once the server starts doing a bit more work and taking more memory for other tasks it starts swapping, causing further degradation as the queue of yet-to-be-serviced client connections starts growing?

Babaganoosh 08-08-2011 12:05 PM

Quote:

Originally Posted by rowan (Post 18339157)
What OS?

Is it possible you've allocated a little too much memory to one or more things, so once the server starts doing a bit more work and taking more memory for other tasks it starts swapping, causing further degradation as the queue of yet-to-be-serviced client connections starts growing?

Ya think? :1orglaugh

critical 08-08-2011 01:32 PM

Your host isn't helping you out with that?


All times are GMT -7. The time now is 07:44 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123