I'm pretty sure that the global special variables for the regex are the cause of errors I'm seeing on a rails app running under jruby/tomcat. I get random incorrect responses under load, and when I run the same input through in a single threaded sample script, it generates the correct response.
Chris