zhuyifei1999@quarry-web-01:/tmp$ sudo du -xh . 4.0K ./.X11-unix 4.0K ./.ICE-unix 4.0K ./.XIM-unix 4.0K ./.font-unix 4.0K ./.Test-unix 4.0K ./systemd-private-1356311e7d1243528f7ab2ce78845672-systemd-timesyncd.service-o2aAGy/tmp 8.0K ./systemd-private-1356311e7d1243528f7ab2ce78845672-systemd-timesyncd.service-o2aAGy 4.0K ./pymp-8eb0qg 4.0K ./pymp-FTwMiV 4.0K ./pymp-8qJ9UX 4.0K ./pymp-nn29By 4.0K ./systemd-private-1356311e7d1243528f7ab2ce78845672-lldpd.service-FTKRnQ/tmp 8.0K ./systemd-private-1356311e7d1243528f7ab2ce78845672-lldpd.service-FTKRnQ 4.0K ./pymp-D7yp54 4.0K ./pymp-aMbNX5 16G . zhuyifei1999@quarry-web-01:/tmp$ ls -lhSr | tail -rw------- 1 www-data www-data 27M Jan 1 1980 tmp4ep2kfte -rw------- 1 www-data www-data 27M Jan 1 1980 tmp33z2r3_y -rw------- 1 www-data www-data 27M Jan 1 1980 tmp24i0ekrl -rw------- 1 www-data www-data 27M Jan 1 1980 tmp2269jgn8 -rw------- 1 www-data www-data 27M Jan 1 1980 tmp0l9wsx1_ -rw------- 1 www-data www-data 27M Jan 1 1980 tmp0e20f4bs -rw------- 1 www-data www-data 27M Jan 1 1980 tmph2ke6104 -rw------- 1 www-data www-data 27M Jan 1 1980 tmp9cf6z32p -rw------- 1 www-data www-data 30M Jan 1 1980 tmpwm572tjk -rw------- 1 www-data www-data 90M Jan 1 1980 tmpdpu5pvvb
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Install tmpreaper on quarry web hosts, clean up temp files 4+ days idle | operations/puppet | production | +48 -0 |
Related Objects
Event Timeline
Mentioned in SAL (#wikimedia-cloud) [2019-11-14T21:59:43Z] <zhuyifei1999_> zhuyifei1999@quarry-web-01:/tmp$ find /tmp/* -mtime +360 -user www-data -exec sudo rm -v {} \; T238375
xlsxwriter creates temp files at two places,
- https://github.com/jmcnamara/XlsxWriter/blob/38f1fcb4567ec779502dd4c9ae2d06ad360e028f/xlsxwriter/packager.py#L163
- https://github.com/jmcnamara/XlsxWriter/blob/e5315fc82d39d1404048e6d07a4b5178683162b7/xlsxwriter/worksheet.py#L3750
As far as I understand this is the latter case and https://github.com/jmcnamara/XlsxWriter/blob/e5315fc82d39d1404048e6d07a4b5178683162b7/xlsxwriter/worksheet.py#L5385 is supposed to delete the file.
The ::tmpreaper module would probably be safe for these instances. Toolforge has to do something slightly more custom, but only because of webservices running on the job grid which leave files in /tmp that should not be removed while the associated service is still running (which can be months at a time).
Change 708150 had a related patch set uploaded (by Andrew Bogott; author: Andrew Bogott):
[operations/puppet@production] Install tmpreaper on quarry web hosts, clean up temp files 4+ days idle
Change 708150 merged by Andrew Bogott:
[operations/puppet@production] Install tmpreaper on quarry web hosts, clean up temp files 4+ days idle
As of today the oldest files in /tmp are from the 26th, so I think tmpreaper is doing its job.