• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Tomcat Working Directory

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My app seems to be taking up lots of memory which is ever increasing to the point where I need to restart the application server. The app uses images constantly and thought it could be related to the tomcat working directory constantly being added to with new uploaded images.

1) Is there a way to configure how long image files within the working directory are stored for?
2)If I delete files from this working directory, can anyone confirm that this will in no way affect the original files? - apart from if I try to load this image through the app it may take longer as it will no longer be cached.

Any advice will be muchly appreciated!

Thankyou
 
Saloon Keeper
Posts: 28420
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm afraid it's up to you to clean out the Tomcat work directory.

The Tomcat work directory, incidentally, is the same directory that webapps will be pointed at when they do a java.io.File get temp directory method call. I think you can therefore override it on the java command line, but there should be a variable you can set in the catalina script.

Oh never mind. I'm not that lazy today. It's CATALINA_TMPDIR, and its default value is CATALINA_BASE/temp.

You can add a CATALINA_BASE/bin/setenv script (.bat or .sh, depending on OS) and make the assignment there if it's convenient.
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic