Tomcat 偶尔会选择错误的 servlet

发布于 2024-12-08 03:41:12 字数 2375 浏览 0 评论 0原文

我有一个 Java Web 应用程序,它向 VXML 解释器提供 VXML 页面。在测试实验室的持续流量条件下,Tomcat (6.0.32) 似乎偶尔会选择错误的 servlet 来处理以下页面请求:

http://localhost/<myapp>/Main.vxml?<some_query_params_that_get_ignored>

下面是我的 web.xml 文件中定义的 servlet 的完整列表。据此,第一个 Servlet 应始终处理上述 URL,但在极少数情况下(周末超过 100K 个请求,比例低于 0.1%),Tomcat 将其路由到第二个 Servlet (CometControllerServlet)。

<servlet>
    <servlet-name>MainVXML</servlet-name>
    <jsp-file>/WEB-INF/jsp/vxml/Main.jsp</jsp-file>
</servlet>
<servlet-mapping>
    <servlet-name>MainVXML</servlet-name>
    <url-pattern>/Main.vxml</url-pattern>
</servlet-mapping>

<servlet>
   <servlet-name>ABPAsync</servlet-name>
   <servlet-class>com.avaya.cc.aaeplite.web.CometControllerServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>ABPAsync</servlet-name>
    <url-pattern>/async/*</url-pattern>
</servlet-mapping>

<servlet>
    <servlet-name>ABP</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>ABP</servlet-name>
    <url-pattern>/app/*</url-pattern>
</servlet-mapping>

最近流量运行的跟踪输出中出现的以下事件表明这些事件的时间......有点分散,因此很难读取任何内容。

27 16:29:54.880 ERROR <http-6080-exec-2    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
27 17:36:40.773 ERROR <http-6080-exec-2    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
27 19:08:18.705 ERROR <http-6080-exec-4    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
27 19:19:58.799 ERROR <http-6080-exec-5    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
27 19:49:14.688 ERROR <http-6080-exec-1    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
27 19:49:34.721 ERROR <http-6080-exec-3    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
28 07:15:30.835 ERROR <http-6080-exec-7    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml

感谢人们对为什么会发生这种情况的任何想法。

I have a Java web application that serves up VXML pages to a VXML interpreter. Under sustained traffic conditions in a test lab, Tomcat (6.0.32) appears to be occasionally selecting the wrong servlet to handle the following page request:

http://localhost/<myapp>/Main.vxml?<some_query_params_that_get_ignored>

Below is the complete list of servlets defined in my web.xml file. According to this, the first servlet should always process the above URL, but in a very small percentage of cases (below 0.1% across 100K+ requests during the course of a weekend), Tomcat routes it to the second servlet (CometControllerServlet).

<servlet>
    <servlet-name>MainVXML</servlet-name>
    <jsp-file>/WEB-INF/jsp/vxml/Main.jsp</jsp-file>
</servlet>
<servlet-mapping>
    <servlet-name>MainVXML</servlet-name>
    <url-pattern>/Main.vxml</url-pattern>
</servlet-mapping>

<servlet>
   <servlet-name>ABPAsync</servlet-name>
   <servlet-class>com.avaya.cc.aaeplite.web.CometControllerServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>ABPAsync</servlet-name>
    <url-pattern>/async/*</url-pattern>
</servlet-mapping>

<servlet>
    <servlet-name>ABP</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>ABP</servlet-name>
    <url-pattern>/app/*</url-pattern>
</servlet-mapping>

The following occurrences in the trace output from the most recent traffic run indicate the timing of these... somewhat spread out, so difficult to read anything into.

27 16:29:54.880 ERROR <http-6080-exec-2    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
27 17:36:40.773 ERROR <http-6080-exec-2    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
27 19:08:18.705 ERROR <http-6080-exec-4    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
27 19:19:58.799 ERROR <http-6080-exec-5    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
27 19:49:14.688 ERROR <http-6080-exec-1    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
27 19:49:34.721 ERROR <http-6080-exec-3    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml
28 07:15:30.835 ERROR <http-6080-exec-7    > [ite.web.CometControllerServlet]  perform() Invalid Request Type: Main.vxml

Appreciate any thoughts people might have on why this is happening.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文