Hung JBoss/Tomcat instances and "ignored" shutdown requests

I kept hearing about how people were using "kill" in Tomcat shutdown scripts, as they'd shutdown an instance but it would still be running. Further attempts to shutdown after the initial one would say something to the effect of "already shut down" or some-such.

I hadn't been experiencing this, and said so publicly-- at which point I promptly started to experience this locally when running certain unit tests.

It sorta bugged me, and having a semi-reproducible set up, I figured what the hell, might as well troubleshoot.

For Schlitz and giggles, I cycled httpd after causing a "hung" process, and what do you know, JBoss finished shutting down.

I think this is something in the way folks have AJP set up. I'm playing with some settings, namely the "connectionTimeout" attribute in the Tomcat AJP connector config, and the "ping" attribute for mod_proxy.

I'll update this when I have a chance to see if one of them worked-- I'm troubleshooting while doing real work, so I don't shut down often. =]

Update:

Well, so far, after adding the connectionTimeout attribute to the AJP connector in deploy/jbossweb.sar/server.xml, I haven't had the shutdown problem.

I'm unconvinced so far, but so far, so good.

Here are some mod_proxy docs:

http://httpd.apache.org/docs/2.3/mod/mod_proxy.html

Basic SQL Injection protection by RewriteRule

Here what I ended up with:

RewriteEngine on

RewriteRule .*NVARCHAR.* /security-violation.htm [NC]
RewriteRule .*DECLARE.* /security-violation.htm [NC]
#RewriteRule .*INSERT.* /security-violation.htm [NC]
RewriteRule .*xp_.* /security-violation.htm [NC]
RewriteRule .*@.* /security-violation.htm [NC]
#RewriteRule .*';* /security-violation.htm [NC]
RewriteRule .*EXEC\(@.* /security-violation.htm [NC]
RewriteRule .*sp_password.* /security-violation.htm [NC]

RewriteCond %{QUERY_STRING} .*sp_password.* [NC]
RewriteRule .* /security-violation.htm
RewriteCond %{QUERY_STRING} .*CAST\(.* [NC]
RewriteRule .* /security-violation.htm
RewriteCond %{QUERY_STRING} .*EXEC\(@.* [NC]
RewriteRule .* /security-violation.htm
RewriteCond %{QUERY_STRING} .*DECLARE.* [NC]
RewriteRule .* /security-violation.htm

#run it over to our dynamic file (coldfusion in this case)
RewriteRule /security-violation.htm /security-violation.cfm [P,L]

BlogCFC was created by Raymond Camden. This blog is running version 5.9.3.000. Contact Blog Owner