We had a problem with too many files opened in linux.
There was a bug with linux that prevented us to set
the ulimit.
Since we saw many posts with that problem
here is the solution we found.
You have to run Tomcat as a daemon! Somehow that bypasses the
ulimit bug.
Here is a startup script.
You have to change the account name that you are running
tomcat under.
We can't take complete credit, we modified a script we found somewhere
else.
#!/bin/bash
#tomcat
# This is the init script for starting up the
# Jakarta Tomcat server
#
# chkconfig: 345 50 50
# description: Starts and stops the Tomcat daemon.
#
# Source function library.
. /etc/rc.d/init.d/functions
# Get config.
. /etc/sysconfig/network
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
#tomcat= /usr/local/jakarta-tomcat-5.0.16
startup=/usr/local/jakarta-tomcat-5.0.16/bin/startup.sh
shutdown=/usr/local/jakarta-tomcat-5.0.16/bin/shutdown.sh
#export JAVA_HOME=/usr/java/j2sdk1.4.1_01
start(){
echo -n $"Starting Tomcat service: "
# Change to tomcat user to start server. Don't run as root.
ulimit -n 9000 ; su tomcataccountname -c " ulimit -n 9000 ;
$startup"
RETVAL=$?
echo
}
stop(){
action $"Stopping Tomcat service: " $shutdown
RETVAL=$?
echo
}
restart(){
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
# This doesn't work ;)
status tomcat
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
exit 1
esac
Hugues Sicotte
Senior Bioinformatics Analyst
Core Genotyping Facility
10817 grovemont circle
Gaithersburg, MD 20877
Tel: 301-496-4060
Fax: 301-480-2235
USPS Mail Address:
8617 Grovemont Circle
Gaithersburg, MD 20892-4605
Courier and visitor Address:
Advanced Technology Center, Room 152F
8617 Grovemont Circle
Gaithersburg, MD 20877
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]