Page 1 of 2

tomcat hangs at shutdown

Posted: Sun Sep 23, 2012 2:23 pm
by pokemon007
Any of you encounter this problem? When shutting down tomcat. Here is the last few lines of output:

Code: Select all

INFO: Stopping service Catalina
[ INFO] 12:11:01 MergeXmlWebApplicationContext - Closing Root WebApplicationContext: startup date [Fri Sep 21 20:52:35 PDT 2012]; root of context hierarchy
[ INFO] 12:11:04 SessionFactoryImpl - closing
[ INFO] 12:11:05 SessionFactoryImpl - closing
[ INFO] 12:11:05 HydratedCacheManagerImpl - Disposing of all hydrated cache members
[ INFO] 12:11:07 MergeEhCacheManagerFactoryBean - Shutting down EHCache CacheManager
[ INFO] 12:11:42 SessionFactoryImpl - closing
[ INFO] 12:11:46 SessionFactoryImpl - closing
[ INFO] 12:11:46 SessionFactoryImpl - closing
Sep 23, 2012 12:12:01 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Sep 23, 2012 12:12:01 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8443


How can I fix it?

Thank you in advance.

Re: tomcat hangs at shutdown

Posted: Mon Sep 24, 2012 8:40 am
by Valdus
Are you running this within eclipse? If so it is easier to use a separate instance.

Re: tomcat hangs at shutdown

Posted: Tue Sep 25, 2012 12:35 am
by pokemon007
No. I'm running tomcat from commandline.

Re: tomcat hangs at shutdown

Posted: Tue Sep 25, 2012 1:47 pm
by Valdus
Are you running it with the command

Code: Select all

 mvn: tomcat7
if so that will hang out very quickly

Re: tomcat hangs at shutdown

Posted: Wed Sep 26, 2012 1:16 am
by phillipuniverse
I don't see any problems with the log that you posted. This just looks like normal shutdown logging statements. Why do you think there is an error?

Re: tomcat hangs at shutdown

Posted: Wed Sep 26, 2012 8:45 am
by Valdus
Its not actually an error the memory required by this program is much larger than the typical web application through eclipse. It actually hangs due to running out of memory. The fastest and easiest way to fix/avoid this is to run it via a window installed service of tomcat as this prevents all the issues entirely.

Re: tomcat hangs at shutdown

Posted: Wed Sep 26, 2012 1:39 pm
by pokemon007
There is no error, but tomcat doesn't exit, and the process is live. I'm running on Mac through catalina.sh run or catalina.sh start with memory configuration:
CATALINA_OPTS='-Xms512m -Xmx1536m -XX:MaxPermSize=256M -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled'

Even only running the site without admin, it still has the same problem. This is nothing to do with eclipse as it's not part of the picture.

You think the memory is not enough for a single user? I'm curious what broadleaf loads that takes so much momery.

Thank you!

-Charlie

Re: tomcat hangs at shutdown

Posted: Wed Sep 26, 2012 2:09 pm
by Valdus
If I may ask how much ram does your computer have and can you try it with out running these commands: -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled

When I run it on windows I run it without the last two commands and never have any issues.

Re: tomcat hangs at shutdown

Posted: Tue Oct 02, 2012 6:55 pm
by pokemon007
Removing that last two options doesn't help. Indeed, these were added to resolve the memory issue, apparently it doesn't have effect on this issue.

Re: tomcat hangs at shutdown

Posted: Wed Oct 03, 2012 8:16 am
by Valdus
The only thing I can think of that could possibly cause a similar issue is that you are using a different jvm than the one that goes with broadleaf. I use 1.6 out of curiousity what version are you using?