News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Slloooowwwww Board

Started by Bors Kaegel, August 21, 2006, 08:58:17 PM

Previous topic - Next topic

Bors Kaegel

Hey guys,

I got a problem that my webhost or I cannot track down. It all started today when the SMF board started accessing really slowly. Here is the e-mail I got from one of the administrators of my webhost:

QuoteHello,

It appears mysql is crashing when your forum tries to connect to it. Mysql usage is fine and then the second I try to load your page it nearly crashes. I killed mysql and then I got

Table './huntacom_smf1/smf_sessions' is marked as crashed and should be repaired

I repaired this database and it appears to be working (as much as it was before) again, however it shows that this particular table was being accessed by mysql when I restarted it. This query is apparently what is hanging since I killed quite a while after refreshing your page. Perhaps you can contact the smf developers about what could be wrong with the database or forum?

Regards,
Rob

Could a SMF guru get with me on this and take a look?

The URL is http://board.huntinalabama.com.

青山 素子

You can try switching from database to normal sessions.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Bors Kaegel

Nope, no help. After it forced logout, I logged back in and no change.

It's like there is a 3-7 second lag between pages, regardless of connection.

Any other ideas? I am willing to allow temporary database and admin access to any officials who are willing to take a look.

青山 素子

Hm. We are going to need to diagnose what specifically is causing the problem.

Try reading README: Checklist for performance problems and README: Requesting help with server configuration. for a start. At the least, you will have info that can be used to help find where the problem is. Also, once you have all the info, make a post on the Performance board. The people who watch there will know a bit more about where to investigate.

Actually, I'll just move this thread over there for you.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Bors Kaegel

My Forum Info:

http://board.huntinalabama.com

http://board.huntinalabama.com/status.php?php

http://board.huntinalabama.com/phpinfo.php

http://wiredhub.net/minihub.html

* No Mods installed. Coppermine Bridge from 1.4.8. Coppermine runs quick.

It speeds back up after I switch to Default. A problem with my theme?

青山 素子

php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

It looks like most of the slowdown is in doing a reverse name against users.

Try going into the admin area, Features and Options / Layout and Options.

Check the box labeled "Disable hostname lookups?".
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Bors Kaegel

Done. No change.

Page created in 8.511 seconds with 9 queries.

Eep.

As compared to a similarily-formatted board on the same webhost, but on a different subdomain-IP.

Page created in 0.69 seconds with 8 queries.

When I switch to the Default theme the speed clears up to normal. Can you spot any oddities with the HTML?

Bors Kaegel


kegobeer

Switch to the default theme so your host doesn't suspend your account.  I would post your question on the Mercury thread so Bloc can take a look.  You should also post any errors in your error log, if any.  Of course, you verified that theme is for RC3, correct?
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Bors Kaegel

kego,

Thanks for the advice.

I figured out what is doing it. I had a text file pulling for the menu on the right. I removed it and it sped up to 0.085 seconds.

Let me post the code:
';

include ("http://www.huntinalabama.com/menu.txt");

echo '


All it did was pull from a text file in the base directory. It puzzles me because I do the same thing on another website with a similar setup and design, and it gives absolutely no problems whatsoever.

Ben_S

Use a relative path if it is on the same server, i.e.

include ("./menu.txt");

Or whatever the path to it is.
Liverpool FC Forum with 14 million+ posts.

Bors Kaegel

Done.

The plot thickens..

The homepage, which pulls from SSI.php for 4 stats, loads very very very slow. And when I try to access the homepage and the forum at the same time, it slows the forum down to a 20 sec + creation time.

Check it out for yourselves: http://www.huntinalabama.com. Try loading the homepage, then the forum. Slloooooowww..

I think we may be getting closer to isolating this problem.

Any ideas what may be causing this bottleneck?

kegobeer

Can you post your php code so we can see it?
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Bors Kaegel

For the homepage? Sure:

<?php include('/home/huntacom/public_html/board/SSI.php'); ?>

<html>

<head>
<title>HuntinAlabama.com - Alabama's Community for Hunting</title>
<link rel="stylesheet" type="text/css" href="main.css">
<meta name="Description" content="HuntinAlabama.com - Alabama's Home for Hunting">
<meta name="Keywords" content="alabama, hunting, deer, score, turkey, score, scoring, fishing">
</head>

<body bgcolor="#554F48" text="#ffffff" link="#0000ff" vlink="#800080" alink="#ff0000" topmargin="0" background="images/page_bg.gif">

<table  width="775" border="0" cellspacing="0" cellpadding="0" align="center" valign="top">
<tr>
<td colspan="3" align="center" valign="top">
<img src="images/logo_top.gif" width="775" height="14" alt=""><br>
</td>
</tr>
<tr>
<td colspan="3" align="center" valign="top">
<img src="images/logo.jpg" width="775" height="177" alt=""><br>
</td>
</tr>
<tr>
<td colspan="3" align="center" valign="top">
<img src="images/logo_drop.gif" width="775" height="11" alt=""><br>
</td>
</tr>
<tr>
            <td width="11" background="images/left_drop.gif"><img src="images/transdot.gif" width="11" height="1" alt=""><br>
</td>
<td width="753" bgcolor="#756C63">
<!-- BEGIN MAIN CONTENT TABLE -->
<table  width="753" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="130" valign="top" align="left">
<!-- BEGIN MENU -->
<?php include('menu.txt'?>
<!-- END MENU -->
</td>
<td width="493" valign="top" align="left">
<!-- MAIN CONTENT BODY BEGIN -->
<table  width="493" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/top_content_back.gif">
<table  width="100%" border="0" cellspacing="9" cellpadding="0">
<tr>
<td class="contentbody">
&nbsp;&nbsp;<img src="images/w.gif" width="19" height="17" alt="">elcome to <b>HuntinAlabama.com</b>, Alabama's home for discussion on deer and turkey hunting on the Internet. Feel free to visit the links to the left to access the various resources on our website, such as our Message Board. Be sure to sign up and be part of one of the fastest-growing deer and turkey hunting communities in Alabama!<br><img src="images/transdot.gif" width="400" height="1" alt=""><br><div align="right"><b>- HuntinAlabama.com Webmaster</b></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td ><img src="images/transdot.gif" width="493" height="15" alt=""></td>
</tr>
<!-- BEGIN RECENT TOPICS -->
<tr>
<td >
<img src="images/recent_posts_header.gif" width="493" height="25" alt=""><br>
</td>
</tr>
<tr>
<td background="images/middle_content_back_filler.gif">
<table  width="100%" border="0" cellspacing="9" cellpadding="0">
<tr>
<td class="contentbody">
<?php ssi_recentPosts(); ?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td >
<img src="images/middle_content_back_bottom.gif" width="493" height="20" alt="">
</td>
</tr>
<!-- END RECENT TOPICS -->
<tr>
<td ><img src="images/transdot.gif" width="493" height="15" alt=""></td>
</tr>
<!-- GALLERY MAP START -->
<tr>
<td >
<img src="images/main_map_header.gif" width="493" height="25" alt=""><br>
</td>
</tr>
<tr>
<td class="contentbody" background="images/middle_content_back_filler.gif" align="center">
<center><img name="Alabama_Map" src="images/alabama_map.gif" width="250" height="400" border="0" usemap="#Alabama_Map"></center>
<?php include('http://www.huntinalabama.com/map.txt'?>
Click a county on the map above to view the <a href="http://gallery.huntinalabama.com">Image Gallery</a><br> associated with that area.<p>Enjoy! Be sure and visit our <a href="http://board.huntinalabama.com">Message Board</a>.
</td>
</tr>
<tr>
<td class="contentbody">
<img src="images/middle_content_back_bottom.gif" width="493" height="20" alt="">
</td>
</tr>
<!-- GALLERY MAP END -->
</table>

<!-- MAIN CONTENT BODYEND -->
</td>
<td width="130" valign="top" align="right">
<!-- BEGIN MISC AND SPONSORS -->
<center><table width="120" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<img src="images/sponsors.gif" width="78" height="21" alt=""><br><img src="images/transdot.gif" width="78" height="5" alt=""><br>
</td>
</tr>
<tr>
<td class="mainmenu" align="center">
<?php include('sponsors.txt'?>
</td>
</tr>
<!-- STATS START -->
<tr>
<td align="center">
<img src="images/stats_header.gif" width="114" height="23" alt="">
</td>
</tr>
<tr>
<td class="contentbody" align="center"><b>:: Now Online ::</b><br>
<?php include('http://board.huntinalabama.com/SSI.php?ssi_function=whosOnline;'); ?>
</td>
</tr>
<tr>
<td class="contentbody" height="20" align="center">
- - - - -
</td>
</tr>
<tr>
<td class="contentbody" align="center"><b>:: The Newest ::</b><br>
<?php include('http://board.huntinalabama.com/SSI.php?ssi_function=latestMember;'); ?>
</td>
</tr>
<tr>
<td class="contentbody" height="20" align="center">
- - - - -
</td>
</tr>
<tr>
<td class="contentbody" align="center"><b>:: Overall Stats ::</b><br>
<?php include('http://board.huntinalabama.com/SSI.php?ssi_function=boardStats;'); ?>
</td>
</tr>
<!-- STATS END -->
</table></center>
<!-- END MISC AND SPONSORS -->
</td>
</tr>
</table>
<!-- END MAIN CONTENT TABLE -->
</td>
            <td width="11" background="images/right_drop.gif"><img src="images/transdot.gif" width="11" height="1" alt=""><br>
</td>
</tr>
<tr>
<td colspan="3" class="copyright" width="775" height="22" background="images/bottom_span.gif" align="center" valign="top"><i>Website designed and maintained by</i> <a href="mailto:[email protected]?subject=HuntinAlabama.com">Kevin Gardner</a><i>. All right reserved.</i>
</td>
</tr>
</table>
<br>

</body>

</html>

kegobeer

#14
Here are some errors:


<?php include('http://board.huntinalabama.com/SSI.php?ssi_function=whosOnline;'); ?>


You already included SSI.php.  This should be:


<?php ssi_whosOnline(); ?>


Same thing:


<?php include('http://board.huntinalabama.com/SSI.php?ssi_function=latestMember;'); ?>



<?php ssi_latestMember(); ?>


Again:


<?php include('http://board.huntinalabama.com/SSI.php?ssi_function=boardStats;'); ?>



<?php ssi_boardStats(); ?>
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Bors Kaegel

http://www.huntinalabama.com

Giving errors now... hmmm....

<?php include('/home/huntacom/public_html/board/SSI.php'); ?>

<html>

<head>
<title>HuntinAlabama.com - Alabama's Community for Hunting</title>
<link rel="stylesheet" type="text/css" href="main.css">
<meta name="Description" content="HuntinAlabama.com - Alabama's Home for Hunting">
<meta name="Keywords" content="alabama, hunting, deer, score, turkey, score, scoring, fishing">
</head>

<body bgcolor="#554F48" text="#ffffff" link="#0000ff" vlink="#800080" alink="#ff0000" topmargin="0" background="images/page_bg.gif">

<table  width="775" border="0" cellspacing="0" cellpadding="0" align="center" valign="top">
<tr>
<td colspan="3" align="center" valign="top">
<img src="images/logo_top.gif" width="775" height="14" alt=""><br>
</td>
</tr>
<tr>
<td colspan="3" align="center" valign="top">
<img src="images/logo.jpg" width="775" height="177" alt=""><br>
</td>
</tr>
<tr>
<td colspan="3" align="center" valign="top">
<img src="images/logo_drop.gif" width="775" height="11" alt=""><br>
</td>
</tr>
<tr>
            <td width="11" background="images/left_drop.gif"><img src="images/transdot.gif" width="11" height="1" alt=""><br>
</td>
<td width="753" bgcolor="#756C63">
<!-- BEGIN MAIN CONTENT TABLE -->
<table  width="753" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="130" valign="top" align="left">
<!-- BEGIN MENU -->
<?php include('menu.txt'?>
<!-- END MENU -->
</td>
<td width="493" valign="top" align="left">
<!-- MAIN CONTENT BODY BEGIN -->
<table  width="493" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/top_content_back.gif">
<table  width="100%" border="0" cellspacing="9" cellpadding="0">
<tr>
<td class="contentbody">
&nbsp;&nbsp;<img src="images/w.gif" width="19" height="17" alt="">elcome to <b>HuntinAlabama.com</b>, Alabama's home for discussion on deer and turkey hunting on the Internet. Feel free to visit the links to the left to access the various resources on our website, such as our Message Board. Be sure to sign up and be part of one of the fastest-growing deer and turkey hunting communities in Alabama!<br><img src="images/transdot.gif" width="400" height="1" alt=""><br><div align="right"><b>- HuntinAlabama.com Webmaster</b></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td ><img src="images/transdot.gif" width="493" height="15" alt=""></td>
</tr>
<!-- BEGIN RECENT TOPICS -->
<tr>
<td >
<img src="images/recent_posts_header.gif" width="493" height="25" alt=""><br>
</td>
</tr>
<tr>
<td background="images/middle_content_back_filler.gif">
<table  width="100%" border="0" cellspacing="9" cellpadding="0">
<tr>
<td class="contentbody">
<?php ssi_recentPosts(); ?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td >
<img src="images/middle_content_back_bottom.gif" width="493" height="20" alt="">
</td>
</tr>
<!-- END RECENT TOPICS -->
<tr>
<td ><img src="images/transdot.gif" width="493" height="15" alt=""></td>
</tr>
<!-- GALLERY MAP START -->
<tr>
<td >
<img src="images/main_map_header.gif" width="493" height="25" alt=""><br>
</td>
</tr>
<tr>
<td class="contentbody" background="images/middle_content_back_filler.gif" align="center">
<center><img name="Alabama_Map" src="images/alabama_map.gif" width="250" height="400" border="0" usemap="#Alabama_Map"></center>
<?php include('http://www.huntinalabama.com/map.txt'?>
Click a county on the map above to view the <a href="http://gallery.huntinalabama.com">Image Gallery</a><br> associated with that area.<p>Enjoy! Be sure and visit our <a href="http://board.huntinalabama.com">Message Board</a>.
</td>
</tr>
<tr>
<td class="contentbody">
<img src="images/middle_content_back_bottom.gif" width="493" height="20" alt="">
</td>
</tr>
<!-- GALLERY MAP END -->
</table>

<!-- MAIN CONTENT BODYEND -->
</td>
<td width="130" valign="top" align="right">
<!-- BEGIN MISC AND SPONSORS -->
<center><table width="120" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<img src="images/sponsors.gif" width="78" height="21" alt=""><br><img src="images/transdot.gif" width="78" height="5" alt=""><br>
</td>
</tr>
<tr>
<td class="mainmenu" align="center">
<?php include('sponsors.txt'?>
</td>
</tr>
<!-- STATS START -->
<tr>
<td align="center">
<img src="images/stats_header.gif" width="114" height="23" alt="">
</td>
</tr>
<tr>
<td class="contentbody" align="center"><b>:: Now Online ::</b><br>
<?php whosOnline(); ?>
</td>
</tr>
<tr>
<td class="contentbody" height="20" align="center">
- - - - -
</td>
</tr>
<tr>
<td class="contentbody" align="center"><b>:: The Newest ::</b><br>
<?php latestMember(); ?>
</td>
</tr>
<tr>
<td class="contentbody" height="20" align="center">
- - - - -
</td>
</tr>
<tr>
<td class="contentbody" align="center"><b>:: Overall Stats ::</b><br>
<?php boardStats(); ?>
</td>
</tr>
<!-- STATS END -->
</table></center>
<!-- END MISC AND SPONSORS -->
</td>
</tr>
</table>
<!-- END MAIN CONTENT TABLE -->
</td>
            <td width="11" background="images/right_drop.gif"><img src="images/transdot.gif" width="11" height="1" alt=""><br>
</td>
</tr>
<tr>
<td colspan="3" class="copyright" width="775" height="22" background="images/bottom_span.gif" align="center" valign="top"><i>Website designed and maintained by</i> <a href="mailto:[email protected]?subject=HuntinAlabama.com">Kevin Gardner</a><i>. All right reserved.</i>
</td>
</tr>
</table>
<br>

</body>

</html>

kegobeer

All functions in SSI have the prefix ssi_.   Add ssi_ to every function call (whosOnline becomes ssi_whosOnline).  I edited my earlier post to reflect those changes.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Bors Kaegel

Damn, I shoulda caught that.  :-\

That did it. Thanks, kegobeer.

One last question, what would be the code I would use on ss_recentposts to limit it to 5?

kegobeer

The format for calling the function is this:


ssi_recentPosts($num_recent = 8, $exclude_boards = null, $output_method = 'echo')


To return 5 posts:


ssi_recentPosts(5);
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Advertisement: