• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

running tomcat in linux for production

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am planning to run tomcat for my production server deploy my app in tomcat, I have to make memory orptions are set well.

I want to specify memory arguments in catalina.sh




I will add this line is this all we need for more memory? Please advice me , I am also new bee to linux I dont want to set environment variables but just modifiy catalina.sh for memory arguments.Please advice.
 
author
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Correct options is

JAVA_OPTS="-Xms1024m –Xmx1024m -XX:MaxPermSize=256m"
If you set both -Xms and -Xmx equal then, Application performance will increase, why you want use perm gen as 1024, my suggestion 256 is sufficient
 
Saloon Keeper
Posts: 24557
168
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
Forget modifying catalina.sh.

The catalina.sh script will look for a TOMCAT_HOME/bin/setenv.sh file and "source" it if it exists. If you put your JAVA_OPTS environment assignment there, you can get the same result without modifying your catalina.sh script (and possibly breaking it!).
 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is there anything more I should worry apart from memory settings ?
I will create datasources, set memeory, what more should I do to make it production servlet engine?
do I have to check if java.io.temp path has sufficient space etc ?

is there anything in them machine i have to check? , this will be running in linux.

 
Tim Holloway
Saloon Keeper
Posts: 24557
168
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
Depending on workload, you may not need to do anything at all. Tomcat's out-of-the-box configuration is pretty serviceable. The main things I have to tailor tend to be stuff like copying in the database drivers that I need to the TOMCAT_HOME/lib directory.

The only real way to tell is to set up stress testing that models what you're actually going to deploy and how people will be using it.

And yes, the disk drive that Tomcat's temp directory is located on should have a decent amount of free space, but usually that's not a lot of space required - unless a lot of people upload large files at the same time.
 
reply
    Bookmark Topic Watch Topic
  • New Topic