Posting in large forum takes time with email enabled

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
marksolesbury
Registered User
Posts: 63
Joined: Fri Feb 12, 2010 12:54 pm

Posting in large forum takes time with email enabled

Post by marksolesbury »

Support Request Template
What version of phpBB are you using? phpBB 3.3.14
What is your board's URL? https://northants4x4forum.com/
Who do you host your board with? HostGator
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? No
Do you have any extensions installed? Yes
What version of phpBB3 did you update from? phpBB 3.0.13
What extensions do you have installed? Change Logo
Clipboard Image
Collapsible Forum Categories
External Links Open in New Window
Lightbo
Password Strength
phpBB Media Embed PlugIn
What styles do you currently have installed? prosilver
What language(s) is your board currently using? British
Which database type/version are you using? I Don't Know
What is your level of experience? Comfortable with PHP and phpBB
What username can be used to view this issue? PhpbbSupport
What password can be used to view this issue? Support123!
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Followed guide, removed files apart form config.php etc, uploaded fresh 3.3.14, migrated BD.
Please describe your problem. Posting in our main 'Northants4x4 Arms Pub' topic takes 10-15 seconds. This area has Topics: 12964 / Posts: 190378. Other areas with less posts take 1 second.
I have done some testing and found that If I disable 'email' board wide, the posting reduces to 1 second in this forum.
I have optimised the tables which had no impact.
Generated by SRT Generator
Mark
Northants4x4 Admin
User avatar
warmweer
Jr. Extension Validator
Posts: 12000
Joined: Fri Jul 04, 2003 6:34 am
Location: somewhere in the space-time continuum

Re: Posting in large forum takes time with email enabled

Post by warmweer »

I used the testing account you supplied and posted in the problematic forum and in another forum.
The second one was almost instantaneous.
The "problematic" forum was slower, but not really problematic, about 2 seconds which actually isn't bad considering the number of images that were loaded.

What's the PHP version you're using?
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72639
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK

Re: Posting in large forum takes time with email enabled

Post by KevC »

I wonder if you have a lot of subscribers and it has to queue up the notifications when the post happens.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
marksolesbury
Registered User
Posts: 63
Joined: Fri Feb 12, 2010 12:54 pm

Re: Posting in large forum takes time with email enabled

Post by marksolesbury »

warmweer wrote: Mon Jan 06, 2025 12:25 pm I used the testing account you supplied and posted in the problematic forum and in another forum.
The second one was almost instantaneous.
The "problematic" forum was slower, but not really problematic, about 2 seconds which actually isn't bad considering the number of images that were loaded.

What's the PHP version you're using?
8.3.6

You can start a new empty post and its the same - 2 seconds is quick though - I saw someone use the account and posted at the same time and I saw 10 seconds - Its odd that if I disable email its instant - If I disable email now, do you want to try again to confirm?
Mark
Northants4x4 Admin
User avatar
marksolesbury
Registered User
Posts: 63
Joined: Fri Feb 12, 2010 12:54 pm

Re: Posting in large forum takes time with email enabled

Post by marksolesbury »

KevC wrote: Mon Jan 06, 2025 12:26 pm I wonder if you have a lot of subscribers and it has to queue up the notifications when the post happens.
Even on a new topic - with no-one subscribed?
Mark
Northants4x4 Admin
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72639
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK

Re: Posting in large forum takes time with email enabled

Post by KevC »

But they might be subscribed to the forum itself, not the topic.

Can can set up notifications to a new topic or post in a forum. If they don't visit regularly but just want to know when something pops up they might subscribe that way.

Someone who knows more than me about databases might be able to tell you if there's a flag somewhere saying how many people that might be.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
marksolesbury
Registered User
Posts: 63
Joined: Fri Feb 12, 2010 12:54 pm

Re: Posting in large forum takes time with email enabled

Post by marksolesbury »

KevC wrote: Mon Jan 06, 2025 12:36 pm But they might be subscribed to the forum itself, not the topic.
I guess so - this forum has been dormant since covid and I want to reenergise it now - I'm happy to purge the subscriptions so that users start fresh.

We only have 1300 users, but a majority will be not used.
Mark
Northants4x4 Admin
User avatar
warmweer
Jr. Extension Validator
Posts: 12000
Joined: Fri Jul 04, 2003 6:34 am
Location: somewhere in the space-time continuum

Re: Posting in large forum takes time with email enabled

Post by warmweer »

marksolesbury wrote: Mon Jan 06, 2025 12:30 pm You can start a new empty post and its the same - 2 seconds is quick though - I saw someone use the account and posted at the same time and I saw 10 seconds - Its odd that if I disable email its instant - If I disable email now, do you want to try again to confirm?
Posted a couple of times more and can't really notice a difference.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
marksolesbury
Registered User
Posts: 63
Joined: Fri Feb 12, 2010 12:54 pm

Re: Posting in large forum takes time with email enabled

Post by marksolesbury »

with developer tools open I see posting.php take 6-7 seconds to load here, so maybe my 10-15 was over the top.

With email disabled board wide, the posting.php takes 300ms - same topic, same forum.

Its still noticeably slower than other areas - Maybe its time for a new Pub2.0 area.
Mark
Northants4x4 Admin
User avatar
warmweer
Jr. Extension Validator
Posts: 12000
Joined: Fri Jul 04, 2003 6:34 am
Location: somewhere in the space-time continuum

Re: Posting in large forum takes time with email enabled

Post by warmweer »

Posted again (twice) about 2 minutes again (after you enabled mail).
It was noticeably slower (between 3-4 seconds)

Navigating to another topic and then returning to the problematic topic was instantaneous.

Unfortunately I don't have a clue what the reason could be.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
marksolesbury
Registered User
Posts: 63
Joined: Fri Feb 12, 2010 12:54 pm

Re: Posting in large forum takes time with email enabled

Post by marksolesbury »

Browsing is indeed instant - I googled this and its been reported before on larger forums - something must be looping though many records somewhere to cause the delay.
Mark
Northants4x4 Admin
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53599
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Posting in large forum takes time with email enabled

Post by Brf »

If it is forum subscriptions causing the problem, it would be your phpbb_forums_watch table.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6518
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Posting in large forum takes time with email enabled

Post by thecoalman »

This may or may not be helpful for your specific issue but it can help with overall performance on large or old forum.

It marks all topics read for everyone older than year, the topics_track table can be particularly large and contain records 20 years old if the forum is that old. This isn't necessarily a bug but very few users ever use the "Mark X read" links that would clean it up.

Code: Select all

DELETE FROM phpbb_topics_track WHERE mark_time< UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 YEAR));
DELETE FROM phpbb_forums_track WHERE mark_time< UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 YEAR));
UPDATE phpbb_users SET user_lastmark=UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 YEAR)) WHERE user_lastmark<UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 YEAR)) AND user_id != 1;
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
marksolesbury
Registered User
Posts: 63
Joined: Fri Feb 12, 2010 12:54 pm

Re: Posting in large forum takes time with email enabled

Post by marksolesbury »

I think I’d be happy to mark everything read for everyone just now.
Then it’s fresh for everyone - it’s an old board dating back to 2006 so has lots of legacy stuff on it.
Mark
Northants4x4 Admin
User avatar
marksolesbury
Registered User
Posts: 63
Joined: Fri Feb 12, 2010 12:54 pm

Re: Posting in large forum takes time with email enabled

Post by marksolesbury »

thecoalman wrote: Mon Jan 06, 2025 10:48 pm This may or may not be helpful for your specific issue but it can help with overall performance on large or old forum.

It marks all topics read for everyone older than year, the topics_track table can be particularly large and contain records 20 years old if the forum is that old. This isn't necessarily a bug but very few users ever use the "Mark X read" links that would clean it up.

Code: Select all

DELETE FROM phpbb_topics_track WHERE mark_time< UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 YEAR));
DELETE FROM phpbb_forums_track WHERE mark_time< UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 YEAR));
UPDATE phpbb_users SET user_lastmark=UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 YEAR)) WHERE user_lastmark<UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 YEAR)) AND user_id != 1;
This removed about 400K rows, but has not improved performance.

Posting.php still takes 5-7 seconds to return when on this forum, and 300ms on others.
Mark
Northants4x4 Admin

Return to “[3.3.x] Support Forum”