Sunday, December 5, 2010

JBoss 5.1 stops responding after 30 minutes HTTP 404

Lately we had a problem. Our JBoss web server stopt after 30 minutes/ 1800 seconds. If there was activity or not the web server did not accept any requests it returned only HTTP 404 not found for servlets that worked perfectly before.

When we put the vfs cache timeout to  45000 seconds and the problem occured after 12,5 hours. Classes are unloaded from the class loader, classes that worked before (spring JdbcTemplate) gave NoClassDeffError / ClassNotFoundException.
There were JBoss servers that worked and servers that stopt responding... After a long search I found a difference in the VFSCache there where duplicate directories (jboss.vfs -> list contextroot).
I thought is this normal? Later on with a consultant we analysed the screen and he noticed: There is a case difference in the dir name!
Hmm the server is started in the windows service with run.bat -contw and the dir is Ontw
After changing the dir to ontw there where no duplicate dirs and the server runs for hours no on the default vfscache settings.

Windows dirs are case insensitive. HashMaps keys in java are case sensitive. This problem would never occur on linux (the jboss server will not start).
Tip: always use lowercase configuration dirs for jboss.

Reported: https://issues.jboss.org/browse/JBAS-8766

No comments:

Post a Comment