]
Tom Fennelly commented on JBESB-3128:
-------------------------------------
Right... I'd guess this is a "feature" of synchronous invocation in general
(with ServiceInvoker). I'd guess it has nothing to do with the timeout itself.
http_gateway synchronousTimeout - operates twice as slow as expected
the first time it is encountered by a service
------------------------------------------------------------------------------------------------------------------
Key: JBESB-3128
URL:
https://jira.jboss.org/jira/browse/JBESB-3128
Project: JBoss ESB
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Process flow
Affects Versions: 4.7
Environment: 4.7 GA
Reporter: Len DiMaggio
Assignee: Daniel Bevenius
Fix For: 4.7 CP1
Attachments: http_gateway.tar, server.log
I'm seeing a very odd problem with the ESB's http_gateway synchronousTimeout
property.
Briefly - the timer operates 100% slower than it should - but only the first time the
timer is invoked for deployed .esb archive. This is reproducible at will with ESB 4.7 and
SOA-P 5.0 ER7.
After experimenting with this - the delay seems to be on a per-service basis - in other
words, the first time a service that hits synchronousTimeout, the timeout operates twice
as slow as it should. Starting with the second time that a service encounters a
synchronousTimeout, the timeout operates as expected.
I'm seeing this with the default synchronousTimeout value, and if the value is
defined in the service definition in jboss-esb.xml
========================================
A modified version of the http_gateway quickstart is attached to demonstrate the problem.
The modifications are:
* A new action class (my40secAction) is added - this class is identical to myAction,
except that it introduces a 40 seconde delay.
* A modified jboss-esb.xml file - the Sales:List service is modified to have a 10 second
synchronousTimeout, and the action invokes the My40secAction class - and a second service
(SlowSales) is added - this service is a clone of Sales:List:
<service category="Sales" name="List"
description="" invmScope="GLOBAL">
<listeners>
<!-- Receives:
http://<host>:<port>/Quickstart_http_gateway/http/sales/* but will be forced
to
authenticate because the "sales" bus has basic
auth configured (above)... -->
<http-gateway name="sales"
busidref="secureFriends" urlPattern="sales/*"> <property
name="synchronousTimeout" value="10000"/> </http-gateway>
</listeners>
<actions mep="RequestResponse">
<action name="print"
class="org.jboss.soa.esb.samples.quickstart.httpgateway.My40secAction"/>
</actions>
</service>
<service category="SlowSales" name="SlowList"
description="" invmScope="GLOBAL">
<listeners>
<!-- Receives:
http://<host>:<port>/Quickstart_http_gateway/http/sales/* but will be forced
to
authenticate because the "sales" bus has basic
auth configured (above)... -->
<http-gateway name="slowsales"
busidref="secureFriends" urlPattern="slowsales/*"> <property
name="synchronousTimeout" value="10000"/> </http-gateway>
</listeners>
<actions mep="RequestResponse">
<action name="print"
class="org.jboss.soa.esb.samples.quickstart.httpgateway.My40secAction"/>
</actions>
</service>
========================================
Here's an example of the behavior I'm seeing:
Test run #1 - approx 20 sec - unexpected as the test is configured for 10 sec timeout
[ldimaggi@ldimaggi http_gateway]$ date;lynx -dump -source -auth=kermit:thefrog
http://localhost:8080/Quickstart_http_gateway/http/sales/a/b/c; date
Fri Jan 15 15:52:47 EST 2010
<html><head><title>JBoss Web/2.1.3 - Error
report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color
: black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head><body><h1>HTTP Status 500 - </h1><HR size="1"
noshade="noshade"><p><b>type</b> Exception
report</p><p><b>message</b>
<u></u></p><p><b>description</b> <u>The server
encountered an internal error () that prevented it from fulfilling this
request.</u></p><p><b>exception</b>
<pre>javax.servlet.ServletException: Failed to deliver message.
org.jboss.soa.esb.listeners.gateway.http.HttpGatewayServlet.service(HttpGatewayServlet.java:215)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
</pre></p><p><b>root cause</b>
<pre>org.jboss.soa.esb.listeners.message.ResponseTimeoutException: No response
received for service [Sales:List].
org.jboss.soa.esb.client.ServiceInvoker.post(ServiceInvoker.java:427)
org.jboss.soa.esb.client.ServiceInvoker.deliverSync(ServiceInvoker.java:219)
org.jboss.soa.esb.listeners.gateway.http.HttpGatewayServlet.service(HttpGatewayServlet.java:187)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
</pre></p><p><b>note</b> <u>The full stack trace of
the root cause is available in the JBoss Web/2.1.3 logs.</u></p><HR
size="1" noshade="noshade"><h3>JBoss
Web/2.1.3</h3></body></html>Fri Jan 15 15:53:07 EST 2010
Then - immediately follows test run #2 - approx 10 seconds - this is what I would have
expected
[ldimaggi@ldimaggi http_gateway]$ date;lynx -dump -source -auth=kermit:thefrog
http://localhost:8080/Quickstart_http_gateway/http/sales/a/b/c; date
Fri Jan 15 15:53:14 EST 2010
<html><head><title>JBoss Web/2.1.3 - Error
report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color
: black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head><body><h1>HTTP Status 500 - </h1><HR size="1"
noshade="noshade"><p><b>type</b> Exception
report</p><p><b>message</b>
<u></u></p><p><b>description</b> <u>The server
encountered an internal error () that prevented it from fulfilling this
request.</u></p><p><b>exception</b>
<pre>javax.servlet.ServletException: Failed to deliver message.
org.jboss.soa.esb.listeners.gateway.http.HttpGatewayServlet.service(HttpGatewayServlet.java:215)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
</pre></p><p><b>root cause</b>
<pre>org.jboss.soa.esb.listeners.message.ResponseTimeoutException: No response
received for service [Sales:List].
org.jboss.soa.esb.client.ServiceInvoker.post(ServiceInvoker.java:427)
org.jboss.soa.esb.client.ServiceInvoker.deliverSync(ServiceInvoker.java:219)
org.jboss.soa.esb.listeners.gateway.http.HttpGatewayServlet.service(HttpGatewayServlet.java:187)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
</pre></p><p><b>note</b> <u>The full stack trace of
the root cause is available in the JBoss Web/2.1.3 logs.</u></p><HR
size="1" noshade="noshade"><h3>JBoss
Web/2.1.3</h3></body></html>Fri Jan 15 15:53:25 EST 2010
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: