Page 1 of 3

Server Error 500 under heavy load

Posted: Mon Jun 10, 2013 10:03 pm
by schimanke
Hi everybody,

I have a problem with my s9y installation which gets a lot of Server Errors 500 when I have heavy loads on my blog which makes it basically unreachable for a pretty long time. I have no idea what may cause this so maybe some of you can help me.

My blog is hosted at 1&1 in one of the better hosting packages and I am using Serendipity 1.6 with PHP 5.2.17 and a mySQL database. All plugins are at their newest versions.

Is there anything I can find out about those errors? As I said, they only occur under heavy loads. Hope somebody can help me with that.

Regards,
Flo

Re: Server Error 500 under heavy load

Posted: Mon Jun 10, 2013 10:10 pm
by schimanke
Okay, reading the FAQs might help. I have set my rewriting to the 1&1 setting and that seems to help... I will have an eye on that.

Re: Server Error 500 under heavy load

Posted: Mon Jun 10, 2013 10:32 pm
by schimanke
No, didn't really help a lot. Any other options? Completely disabeling rewriting doesn't help either.

Re: Server Error 500 under heavy load

Posted: Mon Jun 10, 2013 11:12 pm
by onli
I don't remember that being reported already, could be hard to debug. But Rewriting shouldn't play into it. I could imagine that under heavy load, the amount of possible database connections get exhausted. You could try to increase the pool.

Do you already use the cache-plugin?

Re: Server Error 500 under heavy load

Posted: Tue Jun 11, 2013 7:06 pm
by schimanke
Thanks for your reply, onli. Could you please be a little more specific? What do you mean with "increase the pool"?

And which cache-plugin do you mean? I have an entry in the backend labled "Build cached entries". Is that what you mean?

Best regards,
Flo

Re: Server Error 500 under heavy load

Posted: Tue Jun 11, 2013 7:21 pm
by Timbalu
Garvin once wrote to heavy load problems:
garvinhicking wrote:Hi!

Please ask your server provider for possible performance improvement,s like tuning mysql query cache, decreasing TCP timeouts, using tools like APC, maybe even loadbalancing/clustering servers. Or maybe setting up a reverse proxy.

If the site is unresponsive, this would happen with any other dynamic PHP application as well under heavy load. The only action against that is horizontal scaling of the server infrastructure.

On the s9y side, you can try to disable performance intensive plugins, and maybe disable things like permission based reader privileges. The s9y settings tell you which of those can have a positive effect on performance. If you tell us the plugins you're running, I can tell you which ones of that may cause extra performance.

Also check your database table usage, maybe some tables like visitor stats or spamblock logs are large.

regards,
Garvin
Which ist still true and valid.

If that all is done you could try and install the (more or less experimental) simplecache Plugin.

Re: Server Error 500 under heavy load

Posted: Tue Jun 11, 2013 7:25 pm
by schimanke
Thanks, Timbalu! I'm already looking at my database. The serendipity_spamblocklog table is already at about 400 MB. Could that be a problem? Anything I can do about it?

Thanks again!

Re: Server Error 500 under heavy load

Posted: Tue Jun 11, 2013 7:30 pm
by Timbalu
Might be! I don't know what kind of ressource limits your site was donated by 1&1.
But flushing or empty out that table seems to be a good idea to start with. (*) You could make a dump first to save a copy locally, in case you ever need this again (for personal documentary or so).

(*) Normally a mysql database can easily handle millions of entries. It depends what is allowed by ISP.

Re: Server Error 500 under heavy load

Posted: Tue Jun 11, 2013 7:32 pm
by schimanke
Thanks again. Just to feel safe, emptying out that table does not have any negative effect for my site?

Re: Server Error 500 under heavy load

Posted: Tue Jun 11, 2013 7:34 pm
by Timbalu
No. Its for statistics only. (I think the event_statistics plugin uses it, not sure about bayes).
Also the visitors table.

Re: Server Error 500 under heavy load

Posted: Tue Jun 11, 2013 7:35 pm
by schimanke
Okay, thanks! I'll give it a try.

Re: Server Error 500 under heavy load

Posted: Tue Jun 11, 2013 8:33 pm
by onli
schimanke wrote:Thanks for your reply, onli. Could you please be a little more specific? What do you mean with "increase the pool"?
I mean the number of possible connections, see http://php.net/manual/en/mysql.configuration.php, max_links. But if those are the default values, there is no limit set (there) by default, this makes it less likely to be the source of the problem.

When seeing blogs under heavy load, I often observe that they can't connect to the database anymore which will lead to 500-errors being thrown, so to check in that direction is a good idea
schimanke wrote: And which cache-plugin do you mean? I have an entry in the backend labled "Build cached entries". Is that what you mean?
No, I mean the serendipity_event_simplecache-plugin. It heavily reduces the load and worked well on my blog.

Re: Server Error 500 under heavy load

Posted: Tue Jun 11, 2013 9:52 pm
by schimanke
Thanks again, onli. I will check that plugin as well.

Re: Server Error 500 under heavy load

Posted: Tue Jun 11, 2013 10:17 pm
by kleinerChemiker
You could try cloudflare, which should reduce the page requests because it stores and delivers cached pages.

Re: Server Error 500 under heavy load

Posted: Wed Jun 12, 2013 10:49 pm
by schimanke
Another day another internal server errors. So tidying up the database and installing the serendipity_event_simplecache-plugin didn't really ease the pain. I've been talking to my provider and they suggested that I should better rent a server instead of using a standard webhosting service due to the huge number of visitors.

Is there anything I can check or do before doing that? The problems came from one minute to the next. Any plugins that might cause the trouble? Anything?

Thanks in advance!