all those sess* files in /tmp

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

all those sess* files in /tmp

jidanni
Like yo, do you fellas see what I do on your machines?
$ find /tmp -name sess\* 2>&-|wc -l
95853
$ find /tmp -name sess\* ! -empty 2>&-|wc -l
42637
$ find /tmp -name sess\* ! -empty 2>&-|xargs more 2>&-|less
/tmp/sess_d4espd7ur01k7rq75f83ff7t45
::::::::::::::
wsUserID|i:3;wsUserName|s:4:"Jini";wsToken|s:32:"...
/tmp/sess_rqc4ufi3ev1g8on3novneb9dc7
::::::::::::::
wsUserID|i:2;wsUserName|s:9:"WikiSysop";wsToken|s:32:"...;wsEditToken|s:32:"-...

Any better way than "leaving all those candy bar wrappers on the floor"?

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: all those sess* files in /tmp

Platonides
[hidden email] wrote:

> Like yo, do you fellas see what I do on your machines?
> $ find /tmp -name sess\* 2>&-|wc -l
> 95853
> $ find /tmp -name sess\* ! -empty 2>&-|wc -l
> 42637
> $ find /tmp -name sess\* ! -empty 2>&-|xargs more 2>&-|less
> /tmp/sess_d4espd7ur01k7rq75f83ff7t45
> ::::::::::::::
> wsUserID|i:3;wsUserName|s:4:"Jini";wsToken|s:32:"...
> /tmp/sess_rqc4ufi3ev1g8on3novneb9dc7
> ::::::::::::::
> wsUserID|i:2;wsUserName|s:9:"WikiSysop";wsToken|s:32:"...;wsEditToken|s:32:"-...
>
> Any better way than "leaving all those candy bar wrappers on the floor"?

Configure your php to use another folder, store the sessions in
memcached....


_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: all those sess* files in /tmp

Brion Vibber-3
In reply to this post by jidanni
[hidden email] wrote:
> Like yo, do you fellas see what I do on your machines?
> $ find /tmp -name sess\* 2>&-|wc -l
> 95853
*snip*
> Any better way than "leaving all those candy bar wrappers on the floor"?

The session file save path and garbage collection frequency are
configurable in PHP's settings:

http://de3.php.net/manual/en/session.configuration.php

Additionally you might consider using memcached for storage of session
data, if you are using memcached. You can enable this by setting
$wgSessionsInMemcached = true; in your LocalSettings.php.

-- brion


_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: all those sess* files in /tmp

Bugzilla from andrew@epstone.net
In reply to this post by jidanni
On Fri, Apr 3, 2009 at 8:19 AM,  <[hidden email]> wrote:
> Any better way than "leaving all those candy bar wrappers on the floor"?

Every PHP program ever does this. This is what /tmp is *for*. If you
are sensible and put your /tmp on a ramdisk then it get clears per
restart anyway. A non-issue.

If you really dislike it, look at storing sessions in memcached, which
*also* stores data in RAM, but the data goes away if memcached
crashes, and you don't have any 'ls /memcached' output to clutter up.
The advantage to memcached is that you can access the sessions from
multiple machines.

--
Andrew Garrett

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: all those sess* files in /tmp

Domas Mituzas
In reply to this post by jidanni
> Like yo, do you fellas see what I do on your machines?

mediawiki-l? http://php.net/mailing-lists.php?

Domas

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l