[Bug 15553] New: cgisess_ files polluting the /tmp directory
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 Bug ID: 15553 Summary: cgisess_ files polluting the /tmp directory Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Authentication Assignee: gmcharlt@gmail.com Reporter: philippe.blouin@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: dpavlin@rot13.org When some users want to improve performance, they get the recommandation to switch the syspref "sessionstorage" to 'tmp', which store the session info in the /tmp directory instead of the database. Depending on the frequency of the cleaning process (or lack thereof), this can be heavy pollution into the /tmp directory, making it unusable. "rm cgi*" would not even work since cgi* extends to over 8000 items... A simple fix is to modify the target directory in C4/Auth.pm to /tmp/cgisess. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 --- Comment #1 from Blou <philippe.blouin@inlibro.com> --- Created attachment 46503 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46503&action=edit Bug 15553 - cgisess_ files polluting the /tmp directory When some users want to improve performance, one suggestion is to switch the syspref "sessionstorage" to 'tmp', which store the session info in the /tmp directory instead of the database. Depending on the frequency of the cleaning process (or lack thereof), this can be heavy pollution into the /tmp directory, making it unusable. "rm cgi*" would not even work since cgi* extends to over 8000 items... A simple fix is to modify the target directory in C4/Auth.pm to /tmp/cgisess. Testing scenario: 1) change the syspref SessionStorage to 'tmp' 2) Log into the OPAC, validate that a file named /tmp/cgisess_(something) got created 3) Apply the patch 4) Log into the OPAC, validate that a file /tmp/cgisess/cgisess_(something) got created -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |philippe.blouin@inlibro.com Status|NEW |Needs Signoff --- Comment #2 from Blou <philippe.blouin@inlibro.com> --- My initial plan was to have some value specific to each library (when multiple libraries on a server), but I didn't want to add a syspref, nor could I find an easy, meaningful value to reuse. Deleting the dir poses no problem, since CGI:Session creates the directory when needed, owned by www-data (or equivalent). I only tested on Ubuntu & Debian. No Windows. I added that for our benefit, thought it might be useful to others. No biggie if no one's interested :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.begin@inLibro.com, | |francois.charbonnier@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #3 from Magnus Enger <magnus@libriotech.no> --- Too many /tmp/cgisess* files for a simple rm can also come as an unpleasant surprise if you have Koha set up to use memcached for sessions, and memcached dies for some reason. Bam, next morning your disk is full... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 --- Comment #4 from Magnus Enger <magnus@libriotech.no> --- Created attachment 46559 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46559&action=edit Bug 15553 - [SIGNED-OFF] cgisess_ files polluting the /tmp directory When some users want to improve performance, one suggestion is to switch the syspref "sessionstorage" to 'tmp', which store the session info in the /tmp directory instead of the database. Depending on the frequency of the cleaning process (or lack thereof), this can be heavy pollution into the /tmp directory, making it unusable. "rm cgi*" would not even work since cgi* extends to over 8000 items... A simple fix is to modify the target directory in C4/Auth.pm to /tmp/cgisess. Testing scenario: 1) change the syspref SessionStorage to 'tmp' 2) Log into the OPAC, validate that a file named /tmp/cgisess_(something) got created 3) Apply the patch 4) Log into the OPAC, validate that a file /tmp/cgisess/cgisess_(something) got created Signed-off-by: Magnus Enger <magnus@libriotech.no> Works as advertised. Session files are created in /tmp/cgisess/ instead of directly in /tmp. I usually store sessions in memcached, but a couple of times memcached has died on me, and before I knew it, /tmp was so full of sessions files, I could not easily delete them with "rm /tmp/cgisess*". Being able to delete /tmp/cgisess/ should be a bit easier. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46503|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | CC| |m.de.rooy@rijksmuseum.nl Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46559|0 |1 is obsolete| | --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 46572 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46572&action=edit Bug 15553 - [SIGNED-OFF] cgisess_ files polluting the /tmp directory When some users want to improve performance, one suggestion is to switch the syspref "sessionstorage" to 'tmp', which store the session info in the /tmp directory instead of the database. Depending on the frequency of the cleaning process (or lack thereof), this can be heavy pollution into the /tmp directory, making it unusable. "rm cgi*" would not even work since cgi* extends to over 8000 items... A simple fix is to modify the target directory in C4/Auth.pm to /tmp/cgisess. Testing scenario: 1) change the syspref SessionStorage to 'tmp' 2) Log into the OPAC, validate that a file named /tmp/cgisess_(something) got created 3) Apply the patch 4) Log into the OPAC, validate that a file /tmp/cgisess/cgisess_(something) got created Signed-off-by: Magnus Enger <magnus@libriotech.no> Works as advertised. Session files are created in /tmp/cgisess/ instead of directly in /tmp. I usually store sessions in memcached, but a couple of times memcached has died on me, and before I knew it, /tmp was so full of sessions files, I could not easily delete them with "rm /tmp/cgisess*". Being able to delete /tmp/cgisess/ should be a bit easier. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 46573 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46573&action=edit Bug 15553: [QA Follow-up] Replace hardcoded tmp and add instance to dirname If you use multiple instances on one server, you could have the situation that instance A creates the cgisess subfolder and instance B could have a permission problem. This patch resolves that by allowing each instance to have its own cgisess subfolder. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: Looks good to me, adding the multiple instance case. Another report could deal with cleaning up this folder. Why not remove all older session files in cleanup_database.pl on daily basis? Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15553 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Note that users will be logged out. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org