Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: Kjell H. on June 30, 2005, 12:08:29 PM

Title: Forum is getting slow
Post by: Kjell H. on June 30, 2005, 12:08:29 PM

Hi,

I have a forum with 31555 Posts in 2516 Topics by 1460 Members and have experienced a lot of increased traffic lately. Downside of that is that the forum is getting slow at times. Yesterday it crashed having more traffic than the MySql could handle. The forum is on a shared server, so that might explain partly this problem.

However, is there anything I can do to make it faster and to better handle increased traffic within the script itself?

Will checking the Enable compressed output help?

The Use database driven sessions is checked.

Title: Re: Forum is getting slow
Post by: Ben_S on June 30, 2005, 12:10:31 PM
How many members are online in a 15 min period?
Title: Re: Forum is getting slow
Post by: Kjell H. on June 30, 2005, 12:15:05 PM

The average is about 50 guests and members within a period of 15 minutes.
Title: Re: Forum is getting slow
Post by: Ben_S on June 30, 2005, 01:24:44 PM
50 in 15 mins isn't all that many, it could be the slowness is down to others on the server.

Is it slow all the time, or only when you have that many online?
Title: Re: Forum is getting slow
Post by: Kjell H. on June 30, 2005, 01:31:07 PM

Not all the time, but I do think I will say it is at least 60-70 % of the time. It might be the server on total traffic on all websites, because I just did a check on my site. When the forum is slow, all other sections of my site connected to MySql is also slow. Plain html pages download fast.

I have just made contact with my host and asked them to check if my forum and the increased traffic cause problems for MySql to work properly.
Title: Re: Forum is getting slow
Post by: Seta Soujiro on June 30, 2005, 04:08:58 PM
Ah yes, I sometimes have this problem.  Put this in your cron file to run every 30 minutes: /etc/init.d/httpd stop ; /etc/rc.d/init.d/mysqld stop ; sleep 5 ; /etc/rc.d/init.d/mysqld start ; /etc/init.d/httpd start ; renice -20 -u apache.  This will restart httpd and mysql, and then change the priority of httpd to realtime -20 priority.
Title: Re: Forum is getting slow
Post by: Ben_S on June 30, 2005, 04:12:49 PM
Quote from: Kjell Heilevang on June 30, 2005, 01:31:07 PM

Not all the time, but I do think I will say it is at least 60-70 % of the time. It might be the server on total traffic on all websites, because I just did a check on my site. When the forum is slow, all other sections of my site connected to MySql is also slow. Plain html pages download fast.

I have just made contact with my host and asked them to check if my forum and the increased traffic cause problems for MySql to work properly.

In honesty, I imagine it's likely to be caused by someone elses scripts, do you know what version of MySQL is in use on the server.

Quote from: Yugi on June 30, 2005, 04:08:58 PM
Ah yes, I sometimes have this problem.  Put this in your cron file to run every 30 minutes: /etc/init.d/httpd stop ; /etc/rc.d/init.d/mysqld stop ; sleep 5 ; /etc/rc.d/init.d/mysqld start ; /etc/init.d/httpd start ; renice -20 -u apache.  This will restart httpd and mysql, and then change the priority of httpd to realtime -20 priority.

If you having to restart apache and MySQL every 30 mins, you should probably look into fixing the problem with your scripts / config.

Besides the original poster is on a shared host so cannot do that.
Title: Re: Forum is getting slow
Post by: Kjell H. on June 30, 2005, 05:21:37 PM

QuoteIn honesty, I imagine it's likely to be caused by someone elses scripts, do you know what version of MySQL is in use on the server.


Here's the info at
http://www.cascity.com/forumhall/phpinfo.php

I am not sure if can mess with any cron job since I am on a shared server though.
The host reports back and says everythings look good at their end also checking from an outside computer. Anyhow, I have to do some more research on this.
Title: Re: Forum is getting slow
Post by: [Unknown] on June 30, 2005, 10:46:13 PM
That doesn't show the MySQL version (the one it shows is just PHP's internal support, not the actual MySQL installation.)

Please upload the following file, so we can see what it says.

-[Unknown]