Slow queries

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
NicoBlog
Registered User
Posts: 65
Joined: Sun Dec 01, 2013 5:18 pm

Slow queries

Post by NicoBlog » Wed Feb 28, 2018 4:36 pm

Support Request Template
What version of phpBB are you using? phpBB 3.2.2
What is your board's URL? https://nicoblog.org/forums/
Who do you host your board with? Dedi Xeon E3-1241 v3 - 8GB
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? No
Do you have any MODs installed? No
Do you have any extensions installed? Yes
What version of phpBB3 did you update from? phpBB 3.2.1
What extensions do you have installed?

Authorized for urls 1.0.2
Contact Admin 1.1.4
mChat 2.0.0
VigLink 1.0.3

What styles do you currently have installed? prosilver
What language(s) is your board currently using? English
Which database type/version are you using? MySQL 5
What is your level of experience? Comfortable with PHP and phpBB
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? I noticed the issue on 3.2.1 I updated to 3.2.2 to see if it fixed it but didn't.
Please describe your problem. You wouldn't notice it by using the forum but I got too many slow queries, thousands a day, all very similar (pasted some below)
Generated by SRT Generator
Example queries:

Code: Select all



use forums-db;
SET timestamp=1519833546;
UPDATE phpbb_sessions SET session_time = 1519833546
			WHERE session_id = '844006b62cbd43fece3bd3ef0d4aa46f';
# Time: 2018-02-28T15:59:07.025574Z
# User@Host: cf387324d81f[cf387324d81f] @ localhost []  Id: 4179267
# Query_time: 0.283159  Lock_time: 0.000045 Rows_sent: 254  Rows_examined: 408

use forums-db;
SET timestamp=1519833552;
UPDATE phpbb_sessions SET session_time = 1519833552
			WHERE session_id = '1af3313deca59ec178bdd09ad72a28e2';
# Time: 2018-02-28T15:59:31.348151Z
# User@Host: 8d2947fa2227[8d2947fa2227] @ localhost []  Id: 4179361
# Query_time: 0.108358  Lock_time: 0.000060 Rows_sent: 0  Rows_examined: 0

use forums-db;
SET timestamp=1519833590;
UPDATE phpbb_sessions SET session_time = 1519833590
			WHERE session_id = '844006b62cbd43fece3bd3ef0d4aa46f';
# Time: 2018-02-28T15:59:53.565046Z
# User@Host: 8d2947fa2227[8d2947fa2227] @ localhost []  Id: 4179467
# Query_time: 0.125862  Lock_time: 0.000058 Rows_sent: 0  Rows_examined: 0

use forums-db;
SET timestamp=1519833602;
UPDATE phpbb_sessions SET session_time = 1519833602
			WHERE session_id = '1af3313deca59ec178bdd09ad72a28e2';
# Time: 2018-02-28T16:00:15.703241Z
# User@Host: ce281528bea2[ce281528bea2] @ localhost []  Id: 4179569
# Query_time: 0.113729  Lock_time: 0.000050 Rows_sent: 0  Rows_examined: 1
SET timestamp=1519833615;
UPDATE phpbb_sessions SET session_time = 1519833615
			WHERE session_id = '6f2200e3119d37d21a8bb4b136cc442c';
# Time: 2018-02-28T16:00:20.106734Z
# User@Host: 8d2947fa2227[8d2947fa2227] @ localhost []  Id: 4179585
# Query_time: 0.440722  Lock_time: 0.000061 Rows_sent: 0  Rows_examined: 0

use forums-db;
SET timestamp=1519833622;
UPDATE phpbb_sessions SET session_time = 1519833622
			WHERE session_id = '1af3313deca59ec178bdd09ad72a28e2';
# Time: 2018-02-28T16:00:27.957284Z
# User@Host: 8d2947fa2227[8d2947fa2227] @ localhost []  Id: 4179619
# Query_time: 0.103203  Lock_time: 0.000064 Rows_sent: 0  Rows_examined: 0

use forums-db;
SET timestamp=1519833630;
UPDATE phpbb_sessions SET session_time = 1519833630
			WHERE session_id = '844006b62cbd43fece3bd3ef0d4aa46f';
# Time: 2018-02-28T16:00:31.069454Z
# User@Host: 8d2947fa2227[8d2947fa2227] @ localhost []  Id: 4179638
# Query_time: 0.144568  Lock_time: 0.000055 Rows_sent: 6  Rows_examined: 30

use forums-db;
SET timestamp=1519833633;
UPDATE phpbb_sessions SET session_time = 1519833633
			WHERE session_id = '1af3313deca59ec178bdd09ad72a28e2';
# Time: 2018-02-28T16:00:35.692625Z
# User@Host: ce281528bea2[ce281528bea2] @ localhost []  Id: 4179664
# Query_time: 0.112614  Lock_time: 0.000026 Rows_sent: 0  Rows_examined: 1
SET timestamp=1519833635;
UPDATE phpbb_sessions SET session_time = 1519833635
			WHERE session_id = '6f2200e3119d37d21a8bb4b136cc442c';
# Time: 2018-02-28T16:00:45.066083Z
# User@Host: 8d2947fa2227[8d2947fa2227] @ localhost []  Id: 4179710
# Query_time: 0.101367  Lock_time: 0.000094 Rows_sent: 0  Rows_examined: 0

use forums-db;
SET timestamp=1519833646;
UPDATE phpbb_sessions SET session_time = 1519833646
			WHERE session_id = '1af3313deca59ec178bdd09ad72a28e2';
# Time: 2018-02-28T16:00:48.433989Z
# User@Host: 8d2947fa2227[8d2947fa2227] @ localhost []  Id: 4179725
# Query_time: 0.141709  Lock_time: 0.000057 Rows_sent: 0  Rows_examined: 0

use forums-db;
SET timestamp=1519833651;
UPDATE phpbb_sessions SET session_time = 1519833650
			WHERE session_id = '844006b62cbd43fece3bd3ef0d4aa46f';
# Time: 2018-02-28T16:01:06.386532Z
# User@Host: cf387324d81f[cf387324d81f] @ localhost []  Id: 4179809
# Query_time: 0.162268  Lock_time: 0.000050 Rows_sent: 0  Rows_examined: 0

use forums-db;
SET timestamp=1519833666;
UPDATE phpbb_sessions SET session_time = 1519833666
			WHERE session_id = '844006b62cbd43fece3bd3ef0d4aa46f';
# Time: 2018-02-28T16:01:17.281456Z
# User@Host: ce281528bea2[ce281528bea2] @ localhost []  Id: 4179861
# Query_time: 0.685734  Lock_time: 0.000050 Rows_sent: 0  Rows_examined: 1
SET timestamp=1519833677;
UPDATE phpbb_sessions SET session_time = 1519833676
			WHERE session_id = '6f2200e3119d37d21a8bb4b136cc442c';
# Time: 2018-02-28T16:01:30.074914Z
# User@Host: 0b15c52ff64a[0b15c52ff64a] @ localhost []  Id: 4179916
# Query_time: 0.106692  Lock_time: 0.000048 Rows_sent: 1  Rows_examined: 15

use forums-db;
SET timestamp=1519833711;
UPDATE phpbb_sessions SET session_time = 1519833710
			WHERE session_id = '5669b279043044e4395e75a1003eaa0e';
# Time: 2018-02-28T16:01:53.716513Z
# User@Host: 8d2947fa2227[8d2947fa2227] @ localhost []  Id: 4180012
# Query_time: 0.137025  Lock_time: 0.000078 Rows_sent: 0  Rows_examined: 0










User avatar
Brf
Support Team Member
Support Team Member
Posts: 51834
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Slow queries

Post by Brf » Wed Feb 28, 2018 4:41 pm

Those queries are all less than one second.

NicoBlog
Registered User
Posts: 65
Joined: Sun Dec 01, 2013 5:18 pm

Re: Slow queries

Post by NicoBlog » Wed Feb 28, 2018 5:12 pm

Brf wrote:
Wed Feb 28, 2018 4:41 pm
Those queries are all less than one second.
Yeah, still i'd like to improve this. What is firing "UPDATE phpbb_sessions SET session_time" all the time? can i reduce the number of times this happens? or cleanup something to speed this query up.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51834
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Slow queries

Post by Brf » Wed Feb 28, 2018 5:31 pm

I am not sure about this version of phpBB, but in earlier versions it would happen whenever a user navigates to a new page, but not more than once per minute per user.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66594
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Slow queries

Post by Lumpy Burgertushie » Wed Feb 28, 2018 5:34 pm

I am pretty sure that the busier your site is and the more members you have logging in with trigger the sessions that way.

so, it is probably a sign that your board is doing well and I would not worry about things that take less than a second to run.

what are you trying to accomplish? why do you think your board is running slow? what problems are you seeing?


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

NicoBlog
Registered User
Posts: 65
Joined: Sun Dec 01, 2013 5:18 pm

Re: Slow queries

Post by NicoBlog » Wed Feb 28, 2018 6:09 pm

The board itself seems alright, we are very few people maybe 2-5 at the same time online. I am debugging slowness on wordpress sites on this server and since they share the same slow queries log it caught my attention to see all these phpbb queries logged (i'm also looking and the others but these are just to many too ignore).

We aren't really that big to justify it.

How long does this query take for you? About same time? Maybe something went wrong somewhere we are updating the same installation since 2013.
Maybe older versions didn't do this query at all? I don't remember phpbb queries taking this long.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51834
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Slow queries

Post by Brf » Wed Feb 28, 2018 8:46 pm

Those queries are taking less than one second. They are not long queries.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66594
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Slow queries

Post by Lumpy Burgertushie » Wed Feb 28, 2018 8:50 pm

I think you are making something big out of this when there is nothing wrong with what it is doing. it is normal.

luck,
robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50682
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Slow queries

Post by stevemaury » Wed Feb 28, 2018 8:56 pm

Are you hosting this yourself?
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

NicoBlog
Registered User
Posts: 65
Joined: Sun Dec 01, 2013 5:18 pm

Re: Slow queries

Post by NicoBlog » Wed Feb 28, 2018 10:10 pm

Alright then, i'll ignore these if they are fast enough, thank you all! :D
stevemaury wrote:
Wed Feb 28, 2018 8:56 pm
Are you hosting this yourself?
PS: No, it's a new hosting most people never heard of. I guessed it'll be better to mention it's a dedicated server rather than a name nobody knew.

User avatar
Furball Zen
Registered User
Posts: 381
Joined: Thu Oct 18, 2007 9:38 pm

Re: Slow queries

Post by Furball Zen » Wed Feb 28, 2018 10:17 pm

Youre comparing WP to phphbb in how it acts? LOL. :)
I am the almighty Furball Zen. Hear me fluff.

Site Admin: too many to list ;)
Port 80 is for your server, port 3306 is for your db :)
If your forum displays correctly in IE, it needs to be fixed :)

NicoBlog
Registered User
Posts: 65
Joined: Sun Dec 01, 2013 5:18 pm

Re: Slow queries

Post by NicoBlog » Thu Mar 01, 2018 9:57 am

Furball Zen wrote:
Wed Feb 28, 2018 10:17 pm
Youre comparing WP to phphbb in how it acts? LOL. :)
Let's.
PHPBB should be way faster than WP. I think we all agree?

My main query on WP with 300 unique users takes 0.001 second. (379439 rows on postmeta table)
Updating phpbb_sessions with 5 users online is taking 0.4 seconds. (46 rows on phpbb_sessions table)

We are talking about mysql queries. Not total load time or ttfb.
this isn't normal, you'll have to be on denial to not see this.
Last edited by NicoBlog on Thu Mar 01, 2018 10:02 am, edited 1 time in total.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21458
Joined: Fri Aug 29, 2008 9:49 am
Location: Not watching cricket

Re: Slow queries

Post by Mick » Thu Mar 01, 2018 10:00 am

Yes but surely phpBB and WP queries are different as shown by your example?
"The more connected we get the more alone we become" - Kyle Broflovski

NicoBlog
Registered User
Posts: 65
Joined: Sun Dec 01, 2013 5:18 pm

Re: Slow queries

Post by NicoBlog » Thu Mar 01, 2018 10:07 am

Mick wrote:
Thu Mar 01, 2018 10:00 am
Yes but surely phpBB and WP queries are different as shown by your example?
Yes, they are SELECT, phpbb is doing UPDATE.

User avatar
david63
Registered User
Posts: 16417
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Slow queries

Post by david63 » Thu Mar 01, 2018 10:13 am

NicoBlog wrote:
Thu Mar 01, 2018 10:07 am
they are SELECT, phpbb is doing UPDATE.
That's a bit like comparing apples with oranges!!
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

Post Reply

Return to “[3.2.x] Support Forum”