Task #7272 (closed)
Bug: /tmp/files on mage EMDB
Reported by: | wmoore | Owned by: | wmoore |
---|---|---|---|
Priority: | critical | Milestone: | OMERO-4.4 |
Component: | Web | Version: | n.a. |
Keywords: | n.a. | Cc: | atarkowska, cxallan, jamoore |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | 2011-11-29 (3) |
Description
Seems that various file downloads etc are not cleaning up files in /tmp. Found large numbers of files there. Cleaned up with:
jboss@mage /tmp $ ls | less # lots of files! jboss@mage /tmp $ rm *emanFilter.jpg jboss@mage /tmp $ rm *projection.jpg jboss@mage /tmp $ rm *download jboss@mage /tmp $ rm *dataset_stack.mrc
Also, large numbers of sessionid* files
jboss@mage /tmp $ rm sessionid* -bash: /bin/rm: Argument list too long jboss@mage /tmp $ rm sessionid0* jboss@mage /tmp $ rm sessionida* # etc.....!
Change History (5)
comment:1 Changed 12 years ago by wmoore
- Status changed from new to accepted
comment:2 Changed 12 years ago by wmoore
comment:3 Changed 12 years ago by wmoore
Code like this was creating a new file for every session
tempdir = settings.FILE_UPLOAD_TEMP_DIR tempJpg = os.path.join(tempdir, ('%s.emanFilter.jpg' % (conn._sessionUuid))).replace('\\','/') em.write_image(tempJpg) originalFile_data = FileWrapper(file(tempJpg)) rsp = HttpResponse(originalFile_data) rsp['Content-Type'] = "image/jpg" return rsp
comment:4 Changed 12 years ago by wmoore
- Resolution set to fixed
- Status changed from accepted to closed
Fixed in this commit htts://github.com/will-moore/openmicroscopy/commit/c8ba957d7b91522d7433c62dc4cf043e56a6b590
comment:5 Changed 12 years ago by wmoore
Updated mage. Looking at /var/log/OMEROweb.log with debugging ON, I see these lines for the various temp files mentioned above
Mon, 21 Nov 2011 11:51:44 webemdb DEBUG EMAN2 xyz projection: {'name': '/tmp/tmpR3FJUO.jpg', 'size': 1223} Mon, 21 Nov 2011 11:47:23 webemdb DEBUG EMAN2 filter jpeg: {'name': '/tmp/tmpqqoZmw.jpeg', 'size': 671} Mon, 21 Nov 2011 11:48:40 webemdb DEBUG download file: {'size': 5114, 'name': '/tmp/tmpOrR6Nm.fileAnn', 'fileName': '80_1080.gif'} Mon, 21 Nov 2011 11:52:30 webemdb DEBUG EMAN2 dataset download: {'name': '/tmp/tmpadRO5M.mrc', 'size': 166912}
Then, looking in /tmp/ there are no tmp* files
jboss@mage ~ $ ls /tmp/tmp* ls: cannot access /tmp/tmp*: No such file or directory
NB: when mage runs out of space, postgres crashes (needs a restart)