Out of disk space error on system partition: Can temp location for "file parameter" upload be changed?

75 views
Skip to first unread message

Ioannis Moutsatsos

unread,
Apr 30, 2015, 2:44:10 PM4/30/15
to jenkin...@googlegroups.com
I discovered that on a Windows Jenkins server (Windows 2008 R2 Server) when a 'file parameter" uploads a file to the server it uses the C:\Users\userName\AppData\Local\Temp folder to keep a temporary copy of the file.
In addition, these temporary files are not cleaned with any frequency.

As a result, I have run out of disk space trying to upload large files to the server. 

However, the same server has a very large D partition. Is it possible to redirect the temporary "file parameter" uploads to this partition instead of the C system partition?

Thanks for any feedback!
Ioannis

Bruno P. Kinoshita

unread,
May 2, 2015, 11:34:57 AM5/2/15
to jenkin...@googlegroups.com
Hi Ioannis,


> Is it possible to redirect the temporary "file parameter" uploads to this partition instead of the C system partition?

The upload request is handled by Stapler, which uses Apache Commons FileUpload for the part you have mentioned. For short files (under 10Kb default threshold) you may not see the file being copied to the temporary directory at all. Files larger than this threshold, and under the upload limit, are copied to the temporary directory [1] during the upload.

Stapler creates a DiskFileItemFactory using the default constructor, without specifying a repository (temp dir) [2]. In this case, Apache Commons FileUpload defaults to using the system temporary directory (via java.io.tmpdir).

You can change the java.io.tmpdir to point to somewhere else - though I'm not sure if that wouldn't break something else (I assume it wouldn't, but you probably want to experiment with it first in testing box).

This PR [4] worked locally, but hopefully others will comment with other suggestions here or in GitHub.

Hope that helps
Bruno







From: Ioannis Moutsatsos <imout...@gmail.com>
To: jenkin...@googlegroups.com
Sent: Friday, May 1, 2015 6:44 AM
Subject: Out of disk space error on system partition: Can temp location for "file parameter" upload be changed?

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/45f995a1-a5e4-458c-ac90-a95c8de47ad1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Ioannis Moutsatsos

unread,
May 4, 2015, 10:37:34 AM5/4/15
to jenkin...@googlegroups.com, brunod...@yahoo.com.br
Bruno and Daniel Beck have suggested some good workarounds to this problem.
Please, take a look here https://github.com/stapler/stapler/pull/49 for some additional discussion and details.

Best regards
Ioannis
Reply all
Reply to author
Forward
0 new messages