List Info

Thread: Disk space problem with tomcat cache directory (File.createTempFile)




Disk space problem with tomcat cache directory (File.createTempFile)
user name
2006-08-04 17:29:17
Half-way there....

Adding a:

buffer.deleteOnExit(); 

Sort of helps - in that when you stop the Tomcat instance it
will then
delete the temp file, but not while it is running.

-D

> -----Original Message-----
> From: Darren Hartford [mailto:dhartfordghsinc.com] 
> Sent: Friday, August 04, 2006 11:58 AM
> To: Slide Users Mailing List
> Subject: RE: Disk space problem with tomcat cache
directory 
> (File.createTempFile)
> 
> In NodeRevisionContent.java, there is:
> 
> ====================
>     public long bufferContent(InputStream is) throws
IOException {
>         File buffer =
File.createTempFile("content_", null);
>         OutputStream os = new BufferedOutputStream(new 
> FileOutputStream(buffer));
>         try {
>             long length =
FileHelper.globalBufferCopy(is, os);
>             InputStream bis = new
BufferedInputStream(new 
> FileInputStream(buffer));
>             setContent(bis);
>             return length;
>         } finally {
>             try {
>                 is.close();
>             } finally {
>                 os.close();
>             }
>         }
>     }
> ===================
> 
> Would this be a culprit?
> 
> -D 
> 
> > -----Original Message-----
> > From: Darren Hartford [mailto:dhartfordghsinc.com]
> > Sent: Friday, August 04, 2006 10:35 AM
> > To: Slide Users Mailing List
> > Subject: RE: Disk space problem with tomcat cache
directory
> > 
> > Windows tomcat 5.5.9 does *not* experience this
problem. 
> > 
> > > -----Original Message-----
> > > From: Darren Hartford [mailto:dhartfordghsinc.com]
> > > Sent: Friday, August 04, 2006 10:14 AM
> > > To: Slide Users Mailing List
> > > Subject: RE: Disk space problem with tomcat
cache directory
> > > 
> > > Some more detail: 
> > > 
> > > Linux install of Jpackage version of tomcat,
5.5.9-1jpp 
> experiences 
> > > this problem.
> > > 
> > > On windows Tomcat 5.5.17, the /temp directory
does *not*
> > have the same
> > > symptoms.
> > > 
> > > -D
> > > 
> > > > -----Original Message-----
> > > > From: Darren Hartford
> > > > Sent: Friday, August 04, 2006 10:07 AM
> > > > To: 'Slide Users Mailing List'
> > > > Subject: Disk space problem with tomcat
cache directory
> > > > 
> > > > Hey all,
> > > > I'm experiencing some problems with
Slide built from SVN
> > running on
> > > > Tomcat 5.5/FC5/jpackage sun-jdk 5.
> > > > 
> > > > Under /var/cache/tomcat5/temp is a large
number of 
> temporary files
> > > > (content_NNNNN.tmp) that are the binary
files being 
> sent to Slide.
> > > > 
> > > > These appear to persist even after the
transaction for
> > > injecting them
> > > > is complete.
> > > > 
> > > > Does anyone have any information
regarding this?
> > > > 
> > > > Thanks,
> > > > -D
> > > 
> > > 
> > 
>
------------------------------------------------------------
---------
> > > To unsubscribe, e-mail:
slide-user-unsubscribejakarta.apache.org
> > > For additional commands, e-mail: 
> slide-user-helpjakarta.apache.org
> > > 
> > > 
> > 
> > 
>
------------------------------------------------------------
---------
> > To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
> > For additional commands, e-mail:
slide-user-helpjakarta.apache.org
> > 
> > 
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
> For additional commands, e-mail: slide-user-helpjakarta.apache.org
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
For additional commands, e-mail: slide-user-helpjakarta.apache.org

Disk space problem with tomcat cache directory (File.createTempFile)
user name
2006-08-04 20:18:55
Hi,

had the same problem running slide 2.1 inside JBoss/Tomcat
bundle.
Simplest solution I found was the following:
when running on linux/unix add a cronjob that periodically
delete the 
files in temp-folder
under windows you could use the "at" command to
add a job that does the 
same.

hth
SVen

Darren Hartford schrieb:
> Half-way there....
>
> Adding a:
>
> buffer.deleteOnExit(); 
>
> Sort of helps - in that when you stop the Tomcat
instance it will then
> delete the temp file, but not while it is running.
>
> -D
>
>   
>> -----Original Message-----
>> From: Darren Hartford [mailto:dhartfordghsinc.com] 
>> Sent: Friday, August 04, 2006 11:58 AM
>> To: Slide Users Mailing List
>> Subject: RE: Disk space problem with tomcat cache
directory 
>> (File.createTempFile)
>>
>> In NodeRevisionContent.java, there is:
>>
>> ====================
>>     public long bufferContent(InputStream is)
throws IOException {
>>         File buffer =
File.createTempFile("content_", null);
>>         OutputStream os = new
BufferedOutputStream(new 
>> FileOutputStream(buffer));
>>         try {
>>             long length =
FileHelper.globalBufferCopy(is, os);
>>             InputStream bis = new
BufferedInputStream(new 
>> FileInputStream(buffer));
>>             setContent(bis);
>>             return length;
>>         } finally {
>>             try {
>>                 is.close();
>>             } finally {
>>                 os.close();
>>             }
>>         }
>>     }
>> ===================
>>
>> Would this be a culprit?
>>
>> -D 
>>
>>     
>>> -----Original Message-----
>>> From: Darren Hartford [mailto:dhartfordghsinc.com]
>>> Sent: Friday, August 04, 2006 10:35 AM
>>> To: Slide Users Mailing List
>>> Subject: RE: Disk space problem with tomcat
cache directory
>>>
>>> Windows tomcat 5.5.9 does *not* experience this
problem. 
>>>
>>>       
>>>> -----Original Message-----
>>>> From: Darren Hartford [mailto:dhartfordghsinc.com]
>>>> Sent: Friday, August 04, 2006 10:14 AM
>>>> To: Slide Users Mailing List
>>>> Subject: RE: Disk space problem with tomcat
cache directory
>>>>
>>>> Some more detail: 
>>>>
>>>> Linux install of Jpackage version of
tomcat, 5.5.9-1jpp 
>>>>         
>> experiences 
>>     
>>>> this problem.
>>>>
>>>> On windows Tomcat 5.5.17, the /temp
directory does *not*
>>>>         
>>> have the same
>>>       
>>>> symptoms.
>>>>
>>>> -D
>>>>
>>>>         
>>>>> -----Original Message-----
>>>>> From: Darren Hartford
>>>>> Sent: Friday, August 04, 2006 10:07 AM
>>>>> To: 'Slide Users Mailing List'
>>>>> Subject: Disk space problem with tomcat
cache directory
>>>>>
>>>>> Hey all,
>>>>> I'm experiencing some problems with
Slide built from SVN
>>>>>           
>>> running on
>>>       
>>>>> Tomcat 5.5/FC5/jpackage sun-jdk 5.
>>>>>
>>>>> Under /var/cache/tomcat5/temp is a
large number of 
>>>>>           
>> temporary files
>>     
>>>>> (content_NNNNN.tmp) that are the binary
files being 
>>>>>           
>> sent to Slide.
>>     
>>>>> These appear to persist even after the
transaction for
>>>>>           
>>>> injecting them
>>>>         
>>>>> is complete.
>>>>>
>>>>> Does anyone have any information
regarding this?
>>>>>
>>>>> Thanks,
>>>>> -D
>>>>>           
>>>>         
>>
------------------------------------------------------------
---------
>>     
>>>> To unsubscribe, e-mail:
slide-user-unsubscribejakarta.apache.org
>>>> For additional commands, e-mail: 
>>>>         
>> slide-user-helpjakarta.apache.org
>>     
>>>>         
>>>       
>>
------------------------------------------------------------
---------
>>     
>>> To unsubscribe, e-mail:
slide-user-unsubscribejakarta.apache.org
>>> For additional commands, e-mail:
slide-user-helpjakarta.apache.org
>>>
>>>
>>>       
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
>> For additional commands, e-mail:
slide-user-helpjakarta.apache.org
>>
>>
>>     
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
> For additional commands, e-mail: slide-user-helpjakarta.apache.org
>
>   


------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
For additional commands, e-mail: slide-user-helpjakarta.apache.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )