How to increase Tomcat heap size
To adjust the tomcat heap size, edit $CATALINAHOME/bin/catalina.sh and add this line near the top:
export CATALINA_OPTS=”-Xms512m -Xmx512m”
then restart tomcat. You can verify that it worked by running:
ps -ef | grep java
and looking for the -Xms line in the output
Bind Address in Use error
I was getting this error when trying to start tomcat:
java.net.BindException: Address already in use:8080
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use:8080
To fix this, I followed these instructions:
- Find the zombie process holding the port open: netstat -anp | grep 8080
- use kill -9 to stop it