Sessions table too big

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
Tarantino
Registered User
Posts: 874
Joined: Sat Feb 18, 2012 1:51 pm

Sessions table too big

Post by Tarantino »

Hi there, I've been having for some years a problem with sessions table. My forum was reaching 3Gb database and I saw that almost 2Gb were from sessions table. I run a sql query to see how many records for user = 1 and it was 4907589 records and only 4123 records for user != 1, so something very wrong seems to exist on how phpbb is handling sessions. And for what I googled there are many reports for the last years too about this but nothing was done and I'm quite sad to not see nobody interested on solved this problem that for me I see it as huge/major.

For all I read, I think the problem comes from bots that are not being recognized as bots by phpbb, so a good workaround would be to improved the botlist that seems to be the same for ages, isn't there an udpdated bot list?
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Sessions table too big

Post by david63 »

What version of phpBB are you using because since phpBB 3.1 the sessions table is purged by a cron job every hour.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
Tarantino
Registered User
Posts: 874
Joined: Sat Feb 18, 2012 1:51 pm

Re: Sessions table too big

Post by Tarantino »

I'm using phpBB 3.2.5.

I'm using too Cron Status ext and when I go to ACP I always see the cron always locked: "Cron time locked: 43 minutes ago, Cron: cron.task.core.tidy_search" (It is not always the same cron, but it is always locked)

Last time the tidy_sessions runned was 22 april 2019, 10:14
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Sessions table too big

Post by david63 »

If cron tasks are constantly getting locked then it would appear that you have some other problem. Even if they do get locked they are released after an hour.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
Tarantino
Registered User
Posts: 874
Joined: Sat Feb 18, 2012 1:51 pm

Re: Sessions table too big

Post by Tarantino »

It seems I need to add cron jobs on my server? If so, I need to point to a php cron file, which should be?
Nelly111s
Registered User
Posts: 1
Joined: Wed May 05, 2021 5:28 pm

Re: Sessions table too big

Post by Nelly111s »

I know this thread is quite old, but I too, have a similar problem, with the sessions table growing to 1GB in size (the next biggest table is 100MB). I therefore suspect that if a cron job should run, its not running on my server. I don't know how to check the status of this - can you give me any pointers?

N
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26502
Joined: Fri Aug 29, 2008 9:49 am

Re: Sessions table too big

Post by Mick »

Welcome to phpBB.

You should start your own topic with as much information as possible, preferably filling out the Support Request Template and posting it back in your new topic to enable us to assist you better, thank you.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Post Reply

Return to “[3.2.x] Support Forum”