Server Error 500 under heavy load

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Server Error 500 under heavy load

Post by schimanke » Mon Jun 10, 2013 10:03 pm

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

schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Server Error 500 under heavy load

Post by schimanke » Mon Jun 10, 2013 10:10 pm

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.

schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Server Error 500 under heavy load

Post by schimanke » Mon Jun 10, 2013 10:32 pm

No, didn't really help a lot. Any other options? Completely disabeling rewriting doesn't help either.

User avatar
onli
Regular
Posts: 2355
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Server Error 500 under heavy load

Post by onli » Mon Jun 10, 2013 11:12 pm

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?

schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Server Error 500 under heavy load

Post by schimanke » Tue Jun 11, 2013 7:06 pm

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

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Server Error 500 under heavy load

Post by Timbalu » Tue Jun 11, 2013 7:21 pm

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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Server Error 500 under heavy load

Post by schimanke » Tue Jun 11, 2013 7:25 pm

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!

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Server Error 500 under heavy load

Post by Timbalu » Tue Jun 11, 2013 7:30 pm

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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Server Error 500 under heavy load

Post by schimanke » Tue Jun 11, 2013 7:32 pm

Thanks again. Just to feel safe, emptying out that table does not have any negative effect for my site?

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Server Error 500 under heavy load

Post by Timbalu » Tue Jun 11, 2013 7:34 pm

No. Its for statistics only. (I think the event_statistics plugin uses it, not sure about bayes).
Also the visitors table.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Server Error 500 under heavy load

Post by schimanke » Tue Jun 11, 2013 7:35 pm

Okay, thanks! I'll give it a try.

User avatar
onli
Regular
Posts: 2355
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Server Error 500 under heavy load

Post by onli » Tue Jun 11, 2013 8:33 pm

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.

schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Server Error 500 under heavy load

Post by schimanke » Tue Jun 11, 2013 9:52 pm

Thanks again, onli. I will check that plugin as well.

User avatar
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Server Error 500 under heavy load

Post by kleinerChemiker » Tue Jun 11, 2013 10:17 pm

You could try cloudflare, which should reduce the page requests because it stores and delivers cached pages.

schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Server Error 500 under heavy load

Post by schimanke » Wed Jun 12, 2013 10:49 pm

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!

Post Reply