Bugzilla – Attachment 46572 Details for
Bug 15553
cgisess_ files polluting the /tmp directory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15553 - [SIGNED-OFF] cgisess_ files polluting the /tmp directory
Bug-15553---SIGNED-OFF-cgisess-files-polluting-the.patch (text/plain), 2.01 KB, created by
Marcel de Rooy
on 2016-01-13 10:33:09 UTC
(
hide
)
Description:
Bug 15553 - [SIGNED-OFF] cgisess_ files polluting the /tmp directory
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-01-13 10:33:09 UTC
Size:
2.01 KB
patch
obsolete
>From 6d9acdcb55fa015a942e77ca79a6af04429586f9 Mon Sep 17 00:00:00 2001 >From: Blou <philippe.blouin@inlibro.com> >Date: Mon, 11 Jan 2016 16:41:11 -0500 >Subject: [PATCH] Bug 15553 - [SIGNED-OFF] cgisess_ files polluting the /tmp > directory >Content-Type: text/plain; charset=utf-8 > >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> >--- > C4/Auth.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index d7be1d8..fd99ca0 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1710,7 +1710,7 @@ sub get_session { > } > else { > # catch all defaults to tmp should work on all systems >- $session = new CGI::Session( "driver:File;serializer:yaml;id:md5", $sessionID, { Directory => '/tmp' } ); >+ $session = new CGI::Session( "driver:File;serializer:yaml;id:md5", $sessionID, { Directory => '/tmp/cgisess' } ); > } > return $session; > } >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15553
:
46503
|
46559
| 46572 |
46573