Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using tomcat standalone. Nowadays I see tomcat starts to use more memory than I expect. Serving static files from tomcat can be cause of this? Or can serving statics from apache cause better memory use.

Thx Enes

share|improve this question
up vote 0 down vote accepted

If you need to share static content (HTML, images, CSS, PDFs, etc...) you can use Apache.
I think that it is more configurable and more robust and a lot faster than Tomcat. You have to know that when you serve 100% static files with Apache, each httpd process will use around 2-3 megs of RAM.

Did you think to use a tiny fast server like thttpd?

share|improve this answer

Yes ! Thanks to mod_jk ( you can tell to Apache to server some parts of you application that it would for sure serve better. I'm thinking about static content like pictures. Here is a basic setup of the mod_jk connector :

< VirtualHost *>

ServerName your name

DocumentRoot /home/tomcat/

ErrorLog /var/log/apache2/application-error.log
TransferLog /var/log/apache2/app-access.log
LogFormat "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\""

JkMount /* ajp13_worker
JkUnMount /img ajp13_worker
JkUnMount /css ajp13_worker
JkUnMount /js ajp13_worker

< /VirtualHost>

Notice that thanks to JkUnMount directive you tell to mod_jk to let Apache handle certain part of your application.Moreover, it's always better / simpler to type than

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.