Server Error 500 under heavy load

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
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 » Wed Jun 12, 2013 11:07 pm

If the error is really under heavy load, it is highly unlikely that a simple error in an update of a plugin may cause this. Did you already check the error.log of apache or any other logs? The exact cause of the 500 should be detectable.

Using cloudflare isn't bad advice as well.

Apart from that, i fear that experience with high-traffic-setups of s9y is very limited.

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 11:15 pm

Thanks for that! Unfortunately I do not have access to the logs. I have read a lot of negative things about Cloudfare so I#M not quite sure if it would really be a good idea to try them. But maybe that would by a last shot before trying that server thing.

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

Re: Server Error 500 under heavy load

Post by Timbalu » Thu Jun 13, 2013 8:31 am

How is "high traffic" and "not enough ressorces" exactly defined, in your case?
I still think that normal and quite busy sites can live in normal webhosting, without the boost of an own servers, as long as fundamental rules have taken place.
Use less or less expensive plugins, clean up your code, find the bottleneck in hard- or software, ask for some more Ressources, yes even have a deep look what your server logs say, etc.
Did you really follow Garvins quoted advice in detail?
Regards,
Ian

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

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 » Thu Jun 13, 2013 10:28 am

What bad did you here about cloudflare? Since I'm useing it, this would interest me. Maybe you have a link or two?

tia

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 » Thu Jun 13, 2013 10:15 pm

How is "high traffic" and "not enough ressorces" exactly defined, in your case?
According to my hoster it is about 40.000 unique visitors each day. On Monday it was 60.000 due to the WWDC keynote (my blog is about Apple). My hoster won't tell me about the actual ressources he provides me with but that seemed to be definately too much...

I also got in contact with Garvin and he also thinks that the problem should be on 1&1's side. A dedicated server might be a solution. But it's an expensive one.

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 » Thu Jun 13, 2013 10:19 pm

What bad did you here about cloudflare? Since I'm useing it, this would interest me. Maybe you have a link or two?
Didn't find them anymore. But since it is always the case that people tend to complain instead of praising a service I thought I'd give it a try. The DNS servers are still updating so I cannot really tell if it works.

BTW, you developed the serendipity_event_proxy_realip, right?! I get the following error when trying to install it:

Code: Select all

Parse error: syntax error, unexpected ';' in /homepages/[...]/serendipity/plugins/serendipity_event_proxy_realip/serendipity_event_proxy_realip.php(62) : eval()'d code on line 1

== SERENDIPITY ERROR ==

Please correct:

Cannot modify header information - headers already sent by (output started at /homepages/[...]/serendipity/plugins/serendipity_event_proxy_realip/serendipity_event_proxy_realip.php(62) : eval()'d code:1) in /homepages/[...]/serendipity/serendipity_admin.php on line 11
Any ideas?!

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 » Thu Jun 13, 2013 11:44 pm

Can you try changeing the code on line 62 from

eval('$realip_ip = ' . $realip_var . ';');

to

eval('$realip_ip = ' . $realip_var);

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 » Fri Jun 14, 2013 7:10 am

No. In that case I get this error:

Code: Select all

Parse error: syntax error, unexpected end of file in /homepages/[...]/serendipity/plugins/serendipity_event_proxy_realip/serendipity_event_proxy_realip.php(63) : eval()'d code on line 1

== SERENDIPITY ERROR ==

Please correct:

Cannot modify header information - headers already sent by (output started at /homepages/[...]/serendipity/plugins/serendipity_event_proxy_realip/serendipity_event_proxy_realip.php(63) : eval()'d code:1) in /homepages/[...]/serendipity/serendipity_admin.php on line 11

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 » Fri Jun 14, 2013 9:45 am

Please add before

eval('$realip_ip = ' . $realip_var . ';');

echo '$realip_ip = ' . $realip_var . ';';

and post the output of this line.

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

Re: Server Error 500 under heavy load

Post by Timbalu » Fri Jun 14, 2013 11:09 am

schimanke wrote:
How is "high traffic" and "not enough ressorces" exactly defined, in your case?
According to my hoster it is about 40.000 unique visitors each day. On Monday it was 60.000 due to the WWDC keynote (my blog is about Apple). My hoster won't tell me about the actual ressources he provides me with but that seemed to be definately too much...

I also got in contact with Garvin and he also thinks that the problem should be on 1&1's side. A dedicated server might be a solution. But it's an expensive one.
Yeah, 60K a day is way too much! As far as I know, i.e. from 57K visitors are 39K Spambots. It might depend a little bit on your site, since you are refering to the big "i"! But sorting out lots of spammers via suhosin, iptables, fail2ban, or even sharper tools, would let that server calm down quickly, I presume.
Regards,
Ian

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

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 » Fri Jun 14, 2013 3:27 pm

After about one month after starting with cloudflare the "threats" started to decrease. Starting with about 50% threats I'm now at about 10%.

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 » Fri Jun 14, 2013 11:06 pm

Please add before

eval('$realip_ip = ' . $realip_var . ';');

echo '$realip_ip = ' . $realip_var . ';';

and post the output of this line.

Code: Select all

$realip_ip = ;
Parse error: syntax error, unexpected end of file in /homepages/[...]/serendipity/plugins/serendipity_event_proxy_realip/serendipity_event_proxy_realip.php(64) : eval()'d code on line 1

== SERENDIPITY ERROR ==

Please correct:

Cannot modify header information - headers already sent by (output started at /homepages/[...]/serendipity/plugins/serendipity_event_proxy_realip/serendipity_event_proxy_realip.php:62) in /homepages/[...]/serendipity/serendipity_admin.php on line 11

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 » Sat Jun 15, 2013 5:23 pm

It seems, that the var $realip_var has no value, allthough it has a default value. I'll write a fix and post it here, so you can try it.

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 » Sat Jun 15, 2013 5:31 pm

Thanks! Looking forward to it.

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 » Sat Jun 15, 2013 5:39 pm

Please test this. Your problem should be fixed.
Attachments
serendipity_event_proxy_realip.zip
(10.34 KiB) Downloaded 189 times

Post Reply