[ome-users] sessionid files in /tmp
Aleksandra Tarkowska
A.Tarkowska at dundee.ac.uk
Wed Jun 25 15:08:18 BST 2014
Dear John
As users create new sessions on the OMERO.web, session data can accumulate in your session store. Because OMERO.web uses the file based backend, your temporary directory will contain an increasing number of files. Django does not provide automatic purging of expired sessions. Therefore, it’s your job to purge expired sessions on a regular basis. Django provides a clean-up management command for this purpose: clear sessions. It’s recommended to call this command on a regular basis, for example as a daily cron job.
cd OMERO/lib/python/omeroweb
python manage.py clearsessions
Note that the cache backend isn’t vulnerable to this problem, because caches automatically delete stale data.
If you wish to change it to cache based, first install Memcached and a memcached binding. There are several python memcached bindings available; the two most common are python-memcached and pylibmc. Then set the following
$ bin/omero web stop
$ bin/omero config set omero.web.caches '{"default": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", "LOCATION": "127.0.0.1:11211", "TIMEOUT": "86400" } }'
$ bin/omero config set omero.web.session_engine "django.contrib.sessions.backends.cache"
$ bin/omero web start
I hope it will help
Kind regards
Ola
From: "John Webber (NBI)" <John.Webber at nbi.ac.uk<mailto:John.Webber at nbi.ac.uk>>
Date: Mon, 23 Jun 2014 11:20:08 +0000
To: William Moore <will at lifesci.dundee.ac.uk<mailto:will at lifesci.dundee.ac.uk>>
Cc: "ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>" <ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>>
Subject: Re: [ome-users] sessionid files in /tmp
Hi Will,
Thanks for the response.
I have done some more tests but am still experiencing the same issue. I have restarted HTTPD, Omero and Omero_web. I have also rebooted the server itself.
These files are created when we restart omero web. When omero web is not running the files are not created.
I am running exactly the same python versions, omero versions and ice versions across two servers. The main difference I can see on these servers is that the one which has “sessionid” files gathering in “/tmp” has a later version of httpd as follows:
Server without issue: Server with sessionID issue:
httpd-2.2.3-82.el5.centos httpd-2.2.3-83.el5.centos
httpd-devel-2.2.3-82.el5.centos httpd-devel-2.2.3-83.el5.centos
I have attached a complete list of the different RPMs, but not sure whether any of the others are relevant.
Please can you give me a pointer as to why this is occurring. Is it something that can be corrected, or do I need to set up a cron job to remove the session ID files?
Thanks
John
From: William Moore [mailto:will at lifesci.dundee.ac.uk]
Sent: 20 June 2014 10:46
To: John Webber (NBI)
Cc: ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
Subject: Re: [ome-users] sessionid files in /tmp
Hi John,
It's probably the Django web server that is creating these files in /tmp. See https://docs.djangoproject.com/en/dev/topics/http/sessions/#using-file-based-sessions
and http://stackoverflow.com/questions/10197880/django-file-based-session-doesnt-expire
These are sessions between the browser and the Django server and have nothing to do with OMERO sessions.
Are you aware of any difference in the web server configurations or browser connections between your servers that could explain this behaviour?
Regards,
Will.
On 19 Jun 2014, at 16:38, "John Webber (NBI)" <John.Webber at nbi.ac.uk<mailto:John.Webber at nbi.ac.uk>> wrote:
Hi all,
On one of my Omero servers I am seeing “sessionid” files in /tmp, which are generated every 10 minutes and not removed. These files are called something like “sessionideb93037246a7b1efe7e01f6eec735cef”. On other Omero servers, one or two of these files might exist, but they are not created every 10 minutes or so! These are only small, but there are a lot of them!
Can anyone advise why these are being left behind? This is the SAME server where I was experiencing the “Server error[500]” errors, which have now stopped.
Thanks
John
--------------------------------------------------------------------------------------------------------------------------------------------
John Webber
Computing and Information Services
NBI Partnership Ltd
Norwich Research park
Colney Lane
Norwich
NR4 7UH
E-Mail: john.webber at nbi.ac.uk<mailto:john.webber at nbi.ac.uk>
Web: http://www.nbi.ac.uk<http://www.nbi.ac.uk/>
Tel: +44(0)1603 450 818
Helpdesk (Tel): 1234 HPC Support (Web): http://hpc.nbi.ac.uk<http://hpc.nbi.ac.uk/> (NBI internal)
HPC Support (Tel): 2003 (NBI internal)
The NBI Partnership Ltd provides non-scientific services to the Institute of Food Research, the John Innes Centre, The Genome Analysis Centre and The Sainsbury Laboratory
_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
_______________________________________________ ome-users mailing list ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20140625/c5476bf9/attachment.html>
More information about the ome-users
mailing list