|
|
Joined: Jun 2006
Posts: 697
Addict
|
|
Addict
Joined: Jun 2006
Posts: 697 |
I've been running these forums for many many years and in general they run fine. Recently I've been hit with these entries in my slow query log on my lisashea server. I have a ton of entries matching this. Is there something I could do disable whatever is calling this, if it's not that important?
# Time: 2026-10-16T20:09:24.067774Z
# User@Host: x @ localhost [::1] Id: x
# Query_time: 29.101828 Lock_time: 12.342162 Rows_sent: 1 Rows_examined: 313986
SET timestamp=1792181334;
SELECT ONLINE_USER_TYPE, MAX(ONLINE_BROWSING_FORUM), COUNT(*)
FROM ubbt_ONLINE
WHERE ONLINE_BROWSING_FORUM = 5
GROUP BY ONLINE_USER_TYPE;
# Time: 2026-10-16T20:09:24.269405Z
# User@Host: x @ localhost [::1] Id: x
# Query_time: 17.717767 Lock_time: 0.756433 Rows_sent: 1 Rows_examined: 313986
SET timestamp=1792181346;
SELECT ONLINE_USER_TYPE, MAX(ONLINE_BROWSING_FORUM), COUNT(*)
FROM ubbt_ONLINE
WHERE ONLINE_BROWSING_FORUM = 5
GROUP BY ONLINE_USER_TYPE;
# Time: 2026-10-16T20:09:24.862399Z
# User@Host: x @ localhost [::1] Id: x
# Query_time: 32.615276 Lock_time: 15.060971 Rows_sent: 1 Rows_examined: 313986
SET timestamp=1792181332;
SELECT ONLINE_USER_TYPE, MAX(ONLINE_BROWSING_FORUM), COUNT(*)
FROM ubbt_ONLINE
WHERE ONLINE_BROWSING_FORUM = 5
GROUP BY ONLINE_USER_TYPE;
# Time: 2026-10-16T20:09:25.550319Z
# User@Host: x @ localhost [::1] Id: x
# Query_time: 20.310173 Lock_time: 2.068636 Rows_sent: 1 Rows_examined: 313986
SET timestamp=1792181345;
SELECT ONLINE_USER_TYPE, MAX(ONLINE_BROWSING_FORUM), COUNT(*)
FROM ubbt_ONLINE
WHERE ONLINE_BROWSING_FORUM = 5
GROUP BY ONLINE_USER_TYPE;
|
|
|
|
|
Joined: Jun 2006
Posts: 16,535 Likes: 150
|
|
Joined: Jun 2006
Posts: 16,535 Likes: 150 |
The _ONLINE table is the most polled table in a UBBtheeads install, it holds all of your whos online data and is constantly access on a busy forum and is expected to be hit even when a server has slowed down from other activity such as backups or maintenance tasks. Having a large WOL timeframe would be more rows stored in the database on large forums.
|
|
|
|
|
Joined: Apr 2004
Posts: 2,036 Likes: 177
|
|
Joined: Apr 2004
Posts: 2,036 Likes: 177 |
How many users do you have online when this notice is triggered? hundreds or thousands or several thousand?
your notice says over 300K users Rows_examined: 313986
If you're often getting hundreds of thousands, you may want to adjust the settings to reduce the time-frame of your WOL at the bottom of Control Panel > General, in Who's Online Settings what is your Who's Online Timeframe set to?
|
|
|
|
|
Joined: Jun 2006
Posts: 697
Addict
|
|
Addict
Joined: Jun 2006
Posts: 697 |
Thank you both for the quick response.
I mostly get bots nowadays, I rarely get "real" visitors who post.
I have 12,775 members on this forum with 35,115 posts.
My Who's Online is set to 10 minutes.
I can set that down to 1 minute to see if it helps.
|
|
|
|
|
Joined: Jun 2006
Posts: 697
Addict
|
|
Addict
Joined: Jun 2006
Posts: 697 |
OK it's been a half hour and the ubbt_online table still has 317,748 rows. Can I just delete these out? Are they supposed to cleanse?
UPDATE I read through these forums on the topic and am clearing the cache. I imagine since I rarely get users logging in any more, or posting, that the who's online table pretty much never gets cleared out ...
UPDATE2 - wow my forums are just flying fast now. I suppose I have to manually clear my cache weekly.
Last edited by BellaOnline; Yesterday at 09:13 PM.
|
|
|
|
|
Joined: Apr 2004
Posts: 2,036 Likes: 177
|
|
Joined: Apr 2004
Posts: 2,036 Likes: 177 |
there is no need to manually clear the WOL cache, as it expires outdated entries based on the time frame you have chosen within the "Who's Online Timeframe" setting. if it is not set, then it defaults to 10 minutes.
The function is "clear_online" and is run each time anyone adds a post, visits the login page, logs out, views the wol page, cookies are managed, or an admin manually clears the cache through the control panel cache manager
|
|
|
|
|
Joined: Jun 2006
Posts: 697
Addict
|
|
Addict
Joined: Jun 2006
Posts: 697 |
I set it down to 1 minute, though, and then waited a half hour. It never cleared. You note that it never clears unless someone adds a post, for example. Since my visitors are now mostly bots reading the site, there is rarely a new post made to activate the clear. I need to manually do that. Or, I suppose, make a new post once a week.
|
|
|
|
|
Joined: Apr 2004
Posts: 2,036 Likes: 177
|
|
Joined: Apr 2004
Posts: 2,036 Likes: 177 |
You can wait as long as you want, but if no script activity is triggering the function, the function will never run a check for outdated user entries. In addition to what I've previously listed, refreshing the category/forums will also update the wol cache. this is something a bot would trigger.
|
|
|
|
3 members (BellaOnline, Gizmo, 1 invisible),
199
guests, and
123
robots. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
|