Post reply sometimes very slow

Started by Guy Verschuere, January 11, 2014, 03:59:14 AM

Previous topic - Next topic

Guy Verschuere

Hi all,

I've been tuning lots of stuff for my SMF forum at http://urbexforum.org
Pages are loading extremely fast, a real joy to browse the forum.
Unfortunately I sometimes have the issue that submitting a reply takes  a long time. Mostly it's as fast as all the other pages, like when using the quick reply I don't even see the pagerefresh, that fast.
But, from time to time it takes up to 10 seconds.

Any idea where I need to start looking for this?
What information do you need?

Some details:
VPS dual core server with 4GB ram running Debian 7.3, PHP 5.4.4, Mysql 5.5.33
MemCached and APC opcode cache installed and active
Caching level set to 2 (Issue happens on all cache levels, even with cache disabled)

The server serves 2 SMF forums and 2 Wordpress sites, all with APC cache enabled. CPU usage and disk IOPS are almost idle.

Thanks!

kat

Let's try to isolate this, shall we?

Can you confirm, or not, that this is happening for any of your other members?

What about a trying a different browser? Is that any different?

Guy Verschuere

Other members are confirming the issue.
I just tested with several browser (Chrome, Firefox and Safari on OSX) and it happens everywhere.

Guy Verschuere

Just think of something: on the bottom of the browser it says: "Waiting for http://urbexforum.org"

Storman™

I see you have a redirect in place, not sure if thats relevant to the issue though ??

Storman™

After reading your post again I see that this is actually an intermittent problem.

Maybe disable the the adverts and see if that makes any difference. I think you have asynchronous ads which should load quicker but I've seen many instances where they actually hold up the loading of the page. Not saying it's the issue but worth looking at.

Guy Verschuere

What did you mean by the redirect?

Disabled the ads for now, I could return to the old adsense code if that would cause the issue.

Thanks for thinking with me!

Storman™

QuoteWhat did you mean by the redirect?

Actually I take that back, was referring to the www page at http://www.urbexforum.org/  but it does nothing apart from inform.

kat

I've just taken a look around. At first, the place was really, really fast. But, then, everything just kinda went really slowly. It even came to a complete standstill, a couple of times.

I think you might want to have a word with your host, about this one.

Guy Verschuere

That's something new. I never had issues with loading of pages, only when hitting the post button.
It's a VPS server, everything 's up to me.

kat

I just want for another look and the place is as dead as a dodo. :(

Guy Verschuere

You must have created more than 10 error's, then you're banned for 24h :p

kat


Guy Verschuere


kat

Back to super-whizzy! Well, what little I can see, without being told to register, is. :)

Guy Verschuere

That's true, very closed forum. If you know urbex you know why ;)

kat

Done a bit, myself, in London and Manchester. Did a lot on the railway, too. Having a pass for all sorts of parts of the railway helped. ;)

margarett

You should activate the option to show page loading time and add $db_show_debug = true; in Settings.php
So that you can at least try to identify a problematic query, maybe
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Guy Verschuere

Page loading time is shown at the bottom ;)
Added $db_show_debug = true;

margarett

The new informations will only show to you as admin.
So, try to cause that issue and check the results at the bottom
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Illori

Quote from: margarett on January 11, 2014, 11:26:39 AM
The new informations will only show to you as admin.
So, try to cause that issue and check the results at the bottom

actually $db_show_debug = true; shows to everyone and could be a security issue if left on for a long time. although there is a mod that will make it only show to admin.

and the time per page load is shown to everyone but not a security issue.

Guy Verschuere

Just had another slow load but didn't see any debug message.
Don't know if "Page created in 0.172 seconds with 31 queries." means anything using the quick reply box...

Guy Verschuere

#22
Ooh, nice, the debug info is in black on the black background :p

Page created in 0.122 seconds with 26 queries.

Altough, the page took about 8 seconds.

The Show queries link doesn't work.


Templates: 3: index (default), Display (default), Alerts (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 1: hs4smf.english (default).
Style sheets: 0: .
Files included: 33 - 850KB. (./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/Subs-Db-mysql.php, ./Sources/ActivityBar.php, ./Sources/Subs-MobileDetect.php, ./Sources/Subs-UsersOnlineToday.php, ./LikesBasics.php, ./Sources/ScheduledTasks.php, ./Themes/default/languages/index.english.php, ./Themes/default/languages/Modifications.english.php, ./Themes/default/languages/Likes.english.php, ./Sources/Subs-Pagination.php, ./Sources/Subs-Tapatalk.php, ./Sources/Alerts.php, ./Themes/default/languages/Alerts.english.php, ./Sources/Subs-SimpleColorizer.php, ./Sources/hs4smf-Subs.php, http://urbexforum.org/mobiquo/smartbanner.php, ./Themes/default/index.template.php, ./Sources/Display.php, ./Themes/default/Display.template.php, ./Sources/TopicViewLog.php, ./Sources/Subs-Likes.php, ./Sources/AutoEmbedMediaPro2.php, ./cache/mediaprocache.php, ./analytics.php, ./Themes/default/Alerts.template.php, ./Themes/default/languages/hs4smf.english.php)
Cache hits: 18: 0,01200s for 78.501 bytes (get modSettings: 0,00005s - 0 bytes, put modSettings: 0,00661s - 53071 bytes, get user_settings-155: 0,00066s - 0 bytes, put user_settings-155: 0,00032s - 2404 bytes, get board_parents-0: 0,00020s - 6 bytes, put topic_board-5886: 0,00020s - 910 bytes, put board-21: 0,00018s - 910 bytes, get theme_settings-1:155: 0,00022s - 2931 bytes, get response_prefix: 0,00036s - 11 bytes, get parsing_smileys: 0,00031s - 1584 bytes, get menu_buttons-1_0_41_43_10_40_52_16_11-english: 0,00043s - 6440 bytes, put menu_buttons-1_0_41_43_10_40_52_16_11-english: 0,00050s - 6440 bytes, get parse:38355-4cbba5015c572c4be042f26eb9554323: 0,00029s - 0 bytes, get countreportsupdated913: 0,00033s - 8 bytes, get likes_post_38355: 0,00027s - 3759 bytes, get countreportsupdated424: 0,00038s - 9 bytes, get countreportsupdated913: 0,00029s - 8 bytes, get countreportsupdated155: 0,00041s - 10 bytes)
Queries used: 26.

[Show Queries]



In the Apache access logs I find this, wich means it took 5 seconds between the post and the start of loading the new page.


[11/Jan/2014:21:19:24 +0100] "POST /index.php?board=21;action=post2 HTTP/1.1" 302 498 "http://urbexforum.org/index.php?topic=5886.msg38477;topicseen" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36"
[11/Jan/2014:21:19:29 +0100] "GET /index.php/topic,5886.new.html HTTP/1.1" 200 12840 "http://urbexforum.org/index.php?topic=5886.msg38477;topicseen" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36"

Guy Verschuere

PHP Upgrade gedaan van 5.4.4 naar 5.5.8, ziet er op het eerste zicht naar uit dat het nog erger geworden is.
Door die upgrade is het nu uiteraard wel Opcache ipv APCache geworden.

Storman™

I wouldn't have upgraded yet if that was me, still too many compatibility issues with 5.5 especially with some mods.

Have you tried turning off your ban system ? I couldn't help but notice that K@ said it was whizzy after you turned it off in the posts above.

Are you using the newer asynchronous adsense code ? Although that should be better and avoid latency it's actually worse for some people with the symptoms you mention (no idea why though). It might seriously be worth changing it back.



(P.S. Please write in english in the board)   ;)

Guy Verschuere

Sorry, forgot I was in the English board...

The Fail2ban system is altered so that broken img links don't count as an error anymore.
Like said before, browsing the forum is allways extremely fast. Just a posting a reply or sending a private message sometimes takes very long.
Even while deactivated the adsense code the problem persist.

Guy Verschuere

There were indeed some issues with PHP 5.5, especially the Alerts system didn't work anymore so I reverted to PHP 5.4.
It still happens and I don't seem to pinpoint when exactly it occurs. Really frustrating  :'(

Guy Verschuere

Aha, found something that could lead you guys to a solution...
It isn't actually the posting that goes slow, but the refresh of the page after that.
Found that out when I submitted a reply and my girlfriend could read it instantly while my browser was still waiting.
Btw: issue also happens when using Tapatalk. So it's a quit general issue on my forum.

Advertisement: