TinyPortal

Development => Support => Topic started by: Sakuragi on March 04, 2007, 03:50:46 PM

Title: Shoutbox overloading my server's CPU
Post by: Sakuragi on March 04, 2007, 03:50:46 PM
Hi
I think that the shoutbox overload my server, I'm running SMF 1.1.2, PHP 4.4.4, MySQL 4.1.21
the forum stats : 200-300 users online, 30000 members,  450000 messages, ~60000 pages views per day
using a dedicated server Intel Pentium 4 CPU 2.60GHz, 2Go RAM.

when soutbox is enabled Load averages > 10
when shoutbox is disabled Load averages < 1

Any help is appreciated
Title: Re: Shoutbox overloading my server's CPU
Post by: Crip on March 04, 2007, 03:54:44 PM
Delete all shouts...
Title: Re: Shoutbox overloading my server's CPU
Post by: Sakuragi on March 04, 2007, 03:57:20 PM
already done :-)
Title: Re: Shoutbox overloading my server's CPU
Post by: Sakuragi on March 04, 2007, 04:01:41 PM
when I delete all shouts the Load averages go down to 1, but I have an active board, my members can make 1000 entries per day on the shoutbox
Title: Re: Shoutbox overloading my server's CPU
Post by: Crip on March 04, 2007, 04:45:02 PM
Limit there Shouts..say, 20 per day?
Title: Re: Shoutbox overloading my server's CPU
Post by: Sakuragi on March 04, 2007, 05:30:56 PM
how to do that?
Title: Re: Shoutbox overloading my server's CPU
Post by: G6Cad on March 04, 2007, 07:01:54 PM
Admin/TinyPortal/Block manager/Shoutbox
Linit posts to, set the value you like in the box :)
Title: Re: Shoutbox overloading my server's CPU
Post by: bloc on March 05, 2007, 12:55:02 AM
1000 entries a day? I see that it can be a problem then. It means the number of Page views increases rapidly since members get the page refreshed just to see the new shouts - or post a new one.

I am not sure how you can limit that..the shoutbox doesn't limit shouts per day, the setting is only for how many shouts to collect each time and will have no effect unless you set it to a high number, for example 100-200++.

Of course the page views goes down when shoutbox is off - then everyone is reading pages as normal.

It might be a feature to add though: limit shouts made per day. But it won't stop people from reloading the page just to see the shouts. I am thinking you should seriously consider using a chat software instead of the shoutbox when its generating that much traffic. The shoutbox is not actually meant to be sued as a chat - or used by so many at once(which in itself makes it hard to follow the entries).
Title: Re: Shoutbox overloading my server's CPU
Post by: Sakuragi on March 05, 2007, 01:27:20 PM
Ok thanks I'll use a chat software
Title: Re: Shoutbox overloading my server's CPU
Post by: RoarinRow on March 05, 2007, 05:53:52 PM
Quote from: Sakuragi on March 05, 2007, 01:27:20 PM
Ok thanks I'll use a chat software

I replaced my TP Shoutbox, with this one from ShoutMix.com.  It's like a shoutbox and chat in one

http://www.shoutmix.com/main/index.php
Title: Re: Shoutbox overloading my server's CPU
Post by: Sakuragi on March 06, 2007, 05:22:58 PM
Thanks I'll give it a try
Title: Re: Shoutbox overloading my server's CPU
Post by: Shane84 on April 06, 2007, 08:28:36 AM
Quote from: Bloc on March 05, 2007, 12:55:02 AM
1000 entries a day? I see that it can be a problem then. It means the number of Page views increases rapidly since members get the page refreshed just to see the new shouts - or post a new one.

I am not sure how you can limit that..the shoutbox doesn't limit shouts per day, the setting is only for how many shouts to collect each time and will have no effect unless you set it to a high number, for example 100-200++.

Of course the page views goes down when shoutbox is off - then everyone is reading pages as normal.

It might be a feature to add though: limit shouts made per day. But it won't stop people from reloading the page just to see the shouts. I am thinking you should seriously consider using a chat software instead of the shoutbox when its generating that much traffic. The shoutbox is not actually meant to be sued as a chat - or used by so many at once(which in itself makes it hard to follow the entries).

aye, problem found.  Someone set up a macro scheduler and flooded my shoutbox for two hours on Monday night.  Server loads hit up to 11 and even though there are about 10 other sites on the server, loads rarely even reach 1 (usually during backups) let alone 11.  Unfortunately I was at work and there was not another admin online at the time of the event.  This is actually minor for me because these same people posted pornography and hate messages as well as threats, all using proxies so I've been very busy doing traces all over trying to get the evidence.  This hasn't been my highest priority and I am sorry for not reporting it more quickly.

My apologies for going into too much detail but I thought you'd like to know.

FYI, I am still using 0.9.7 but I have seen 0.9.8 and did not see a flood limit control so I'm going to assume either version would have the same problem, if not, disregard this.
Title: Re: Shoutbox overloading my server's CPU
Post by: knat on April 06, 2007, 08:58:58 AM
Quote from: RoarinRow on March 05, 2007, 05:53:52 PM
Quote from: Sakuragi on March 05, 2007, 01:27:20 PM
Ok thanks I'll use a chat software

Thanks for this link .. very cool

I replaced my TP Shoutbox, with this one from ShoutMix.com.  It's like a shoutbox and chat in one

http://www.shoutmix.com/main/index.php
Title: Re: Shoutbox overloading my server's CPU
Post by: akulion on April 07, 2007, 12:48:09 PM
this is a common problem with all sites runing a shoutbox, when they get large with many users it is highly recommended NOT to have shoutboxes, because they cause problems - esp AJAX type shoutboxes are a big nono for bigger sites
Title: Re: Shoutbox overloading my server's CPU
Post by: Shane84 on April 07, 2007, 12:50:31 PM
Quote from: Gobo on April 07, 2007, 12:48:09 PM
this is a common problem with all sites runing a shoutbox, when they get large with many users it is highly recommended NOT to have shoutboxes, because they cause problems - esp AJAX type shoutboxes are a big nono for bigger sites

I can see your point for the original post, definitely.  I just wanted to post to make sure what happened to my site is seen.  A flood limit would be great if possible.
Title: Re: Shoutbox overloading my server's CPU
Post by: Crip on April 07, 2007, 03:36:40 PM
This is a php 'tagboard'/shoutbox (script) and does have flood control -- i used it long ago but it has been updated many time since:
http://www.phptagboard.com/