Advertisement:

Author Topic: Forum is getting slow  (Read 6354 times)

Offline Kjell H.

  • Charter Member
  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
Forum is getting slow
« 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.


Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,678
  • xxx
Re: Forum is getting slow
« Reply #1 on: June 30, 2005, 12:10:31 PM »
How many members are online in a 15 min period?
Liverpool FC Forum with 9 million+ posts.

Offline Kjell H.

  • Charter Member
  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
Re: Forum is getting slow
« Reply #2 on: June 30, 2005, 12:15:05 PM »

The average is about 50 guests and members within a period of 15 minutes.

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,678
  • xxx
Re: Forum is getting slow
« Reply #3 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?
Liverpool FC Forum with 9 million+ posts.

Offline Kjell H.

  • Charter Member
  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
Re: Forum is getting slow
« Reply #4 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.

Offline Seta Soujiro

  • Jr. Member
  • **
  • Posts: 218
  • Gender: Male
Re: Forum is getting slow
« Reply #5 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.

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,678
  • xxx
Re: Forum is getting slow
« Reply #6 on: June 30, 2005, 04:12:49 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.

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.
Liverpool FC Forum with 9 million+ posts.

Offline Kjell H.

  • Charter Member
  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
Re: Forum is getting slow
« Reply #7 on: June 30, 2005, 05:21:37 PM »

Quote
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.


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.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Forum is getting slow
« Reply #8 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]