Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2802

[3.3.x] Support Forum • Re: big session table

$
0
0
You do not need to empty the whole table as that logs everyone out. You can use this query:

Code:

DELETE FROM phpbb_sessions WHERE session_last_visit <= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 HOUR)) AND session_user_id = 1;
Or simply:

Code:

DELETE FROM phpbb_sessions WHERE  session_user_id = 1;
MySQL/MariaDB has event scheduler, I haven't used it but you can schedule the query to run every 30 minutes or whatever time frame you want.

Statistics: Posted by thecoalman — Thu May 08, 2025 6:28 am



Viewing all articles
Browse latest Browse all 2802

Trending Articles