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


[1] https://commons.apache.org/proper/commons-fileupload/using.html
[2] 
https://github.com/stapler/stapler/blob/b0b0b96e8561914a824517784dfda3f420b42549/core/src/main/java/org/kohsuke/stapler/RequestImpl.java#L865
[3] 
https://github.com/apache/commons-fileupload/blob/a6ab65198a8f5c31044d6352dacbc3495c861943/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java#L544
[4] https://github.com/stapler/stapler/pull/49
 
      From: Ioannis Moutsatsos <[email protected]>
 To: [email protected] 
 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?
   
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-- 
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 [email protected].
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.


   

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/1612514023.107324.1430580712752.JavaMail.yahoo%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to