Piwigo Bugtracker

Piwigo bug tracker has moved to Github

This bugtracker is kept to provide history on old issues.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002338Piwigodatabasepublic2011.06.12 00:142011.07.13 22:18
Assigned Toplg 
PlatformOSOS Version
Product Version2.2.2 
Target Version2.2.4Fixed in Version2.2.4 
Summary0002338: sessions table gets huge, use automatic purge
DescriptionThe only way to reduce size of #sessions table is to run the maintainance action "purge sessions". If you have a very popular gallery and don't like to repeat maintainance actions every week, an automatic purge would be better.

Maybe some code in include/common like:

if (mt_rand(0,100) == 0)
TagsNo tags attached.
Database engine and version
PHP version
Web serverApache 1.3.x
Attached Files

- Relationships

-  Notes
rvelices (developer)
2011.06.17 19:43

Normally this is done automatically by php ini configuration.

http://us3.php.net/manual/en/session.configuration.php [^]

I think these work fine. However beware of robots - every hit generates a new entry in the table
plg (manager)
2011.06.17 20:27

Here is what we have on a standard Debian (which runs many web servers)

; This is disabled in the Debian packages, due to the strict permissions
; on /var/lib/php5. Instead of setting this here, see the cronjob at
; /etc/cron.d/php5, which uses the session.gc_maxlifetime setting below.
; php scripts using their own session.save_path should make sure garbage
; collection is enabled by setting session.gc_probability
;session.gc_probability = 0
session.gc_divisor = 100

; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440

We can say that Piwigo uses its own session.save_path because sessions are saved in the database. I have a serious doubt that the session table will ever be automatically purged.

On Piwigo Demo, we had 5M (millions) sessions and 99,999% where out of date.
svn (reporter)
2011.07.13 22:16

[Subversion] r11736 by plg on branch 2.2

-----[Subversion commit log]----------------------------------------------------
bug 2338 fixed: force purge on sessions table (each time a user gets connected)
svn (reporter)
2011.07.13 22:16

[Subversion] r11737 by plg on trunk

-----[Subversion commit log]----------------------------------------------------
merge r11736 from branch 2.2 to trunk

bug 2338 fixed: force purge on sessions table (each time a user gets connected)

- Issue History
Date Modified Username Field Change
2011.06.12 00:14 plg New Issue
2011.06.12 00:14 plg Status new => assigned
2011.06.12 00:14 plg Assigned To => plg
2011.06.12 00:14 plg browser => any
2011.06.12 00:14 plg Web server => Apache 1.3.x
2011.06.17 19:43 rvelices Note Added: 0005245
2011.06.17 20:27 plg Note Added: 0005246
2011.07.13 22:16 svn Checkin
2011.07.13 22:16 svn Note Added: 0005329
2011.07.13 22:16 svn Checkin
2011.07.13 22:16 svn Note Added: 0005330
2011.07.13 22:18 plg Status assigned => closed
2011.07.13 22:18 plg Resolution open => fixed
2011.07.13 22:18 plg Fixed in Version => 2.2.4

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker