synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jef Waltman (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SYNAPSE-225) Leaking resources when the connection times out.
Date Tue, 22 Apr 2008 23:45:21 GMT

    [ https://issues.apache.org/jira/browse/SYNAPSE-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591480#action_12591480
] 

Jef Waltman commented on SYNAPSE-225:
-------------------------------------

Ruwan - thanks very much to you and Anankha for your work in resolving this.  From my testing,
the fix in SVN 650563 looks good.

I tested the following scenarios in synapse-1.1.1 (pre-fix) and synapse-1.2-SNAPSHOT (650563)
(post-fix):

Scenario 1, normal request/response via proxy.

1. SOAP consumer posts request to Synapse at http://localhost:8080/soap/Proxied_Service
2. Synapse forwards request to external SOAP provider
3. External SOAP provider returns response to Synapse
4. Synapse forwards response to SOAP consumer

FIFO leaks: two in pre-fix, zero in post-fix.

Scenario 2, null request to Synapse:

1. Web browser accesses http://localhost:8080/

FIFO leaks: four in pre-fix, zero in post-fix.

Scenario 3, null response to client:

1. SOAP consumer posts request to Synapse at http://localhost:8080/soap/Proxied_Service
2. Synapse forwards request to external SOAP provider
3. External SOAP provider returns response to Synapse
4. Synapse routes response message to drop mediator

FIFO leaks: 5 in pre-fix, zero in post fix.

As you and Asankha are also maintainers on the WSO2-ESB project, you may also be interested
to know that I ran these tests against a standalone synapse and also the 2008-01-30 snapshot
of wso2-esb-1.6 (with updated synapse-transports and httpcore jars, the latter needed for
DefaultedHttpParams.class).  Everything identical to results above.

In wso2-esb, I also tested replacing the SOAP consumer in Scenario 3 with a message injected
by the messageInjector task - three leaks pre-fix, zero leaks post-fix.  Works great.

Again, thanks for your outstanding efforts on this one.

Jef.

> Leaking resources when the connection times out.
> ------------------------------------------------
>
>                 Key: SYNAPSE-225
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-225
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 1.1.1
>         Environment: [root@lou-lxapachetest ~]# cat /etc/redhat-release 
> Red Hat Enterprise Linux Server release 5.1 (Tikanga)
> [root@lou-lxapachetest ~]# uname -a
> Linux lou-lxapachetest 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:02 EDT 2007 i686 i686 i386
GNU/Linux
> [root@lou-lxapachetest ~]# java -version
> java version "1.5.0_13"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode, sharing)
> [root@lou-lxapachetest ~]# 
>            Reporter: SteveKrall
>            Assignee: Ruwan Linton
>             Fix For: 1.2
>
>
> I'm using 1.1.1-RC1.  When a connection times out, I can see using lsof pipes being left
open.  This does not happen when the connection works normally.
> Steps to reproduce:
> 1. Check the open files
> 2. Run the SimpleStockQuoteApplication successfully
> 3. Check the open files (open files will go up on the first successful request, but not
subsequent successful request
> 4. Run the SimpleStockQuoteApplication this time with a  -Daddurl that will generate
a timeout.
> 5. Check the open files.  Repeat steps 4 and 5.  The number will continue to grow.
> My output from a test:
> skrall@skralldesktop ~/files/downloads/synapse/synapse-1.1.1/samples/axis2Client $ lsof
-p 27788 | wc -l
> 245
> skrall@skralldesktop ~/files/downloads/synapse/synapse-1.1.1/samples/axis2Client $ lsof
-p 27788 | grep pipe | wc -l
> 24
> skrall@skralldesktop ~/files/downloads/synapse/synapse-1.1.1/samples/axis2Client $ ant
stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8080
> Buildfile: build.xml
> init:
> compile:
> stockquote:
>      [java] Standard :: Stock price = $99.43283516858692
> BUILD SUCCESSFUL
> Total time: 2 seconds
> skrall@skralldesktop ~/files/downloads/synapse/synapse-1.1.1/samples/axis2Client $ lsof
-p 27788 | wc -l
> 245
> skrall@skralldesktop ~/files/downloads/synapse/synapse-1.1.1/samples/axis2Client $ lsof
-p 27788 | grep pipe | wc -l
> 24
> skrall@skralldesktop ~/files/downloads/synapse/synapse-1.1.1/samples/axis2Client $ ant
stockquote -Daddurl=http://<HostThatWillCauseTimeout>:9000/soap/SimpleStockQuoteService
-Dtrpurl=http://localhost:8080
> Buildfile: build.xml
> init:
> compile:
> stockquote:
>      [java] 2008-01-15 16:05:40,829 [-] [main]  INFO HTTPSender Unable to sendViaPost
to url[http://localhost:8080]
>      [java] java.net.SocketTimeoutException: Read timed out
>      [java]     at java.net.SocketInputStream.socketRead0(Native Method)
>      [java]     at java.net.SocketInputStream.read(SocketInputStream.java:129)
>      [java]     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>      [java]     at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
>      [java]     at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
>      [java]     at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)
>      [java]     at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)
>      [java]     at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)
>      [java]     at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)
>      [java]     at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
>      [java]     at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
>      [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
>      [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
>      [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
>      [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
>      [java]     at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
>      [java]     at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
>      [java]     at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
>      [java]     at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
>      [java]     at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
>      [java]     at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>      [java]     at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
>      [java]     at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>      [java]     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>      [java]     at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>      [java]     at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>      [java]     at samples.userguide.StockQuoteClient.executeClient(Unknown Source)
>      [java]     at samples.userguide.StockQuoteClient.main(Unknown Source)
>      [java] org.apache.axis2.AxisFault: Read timed out
>      [java]     at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>      [java]     at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
>      [java]     at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
>      [java]     at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
>      [java]     at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
>      [java]     at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>      [java]     at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
>      [java]     at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>      [java]     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>      [java]     at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>      [java]     at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>      [java]     at samples.userguide.StockQuoteClient.executeClient(Unknown Source)
>      [java]     at samples.userguide.StockQuoteClient.main(Unknown Source)
>      [java] Caused by: java.net.SocketTimeoutException: Read timed out
>      [java]     at java.net.SocketInputStream.socketRead0(Native Method)
>      [java]     at java.net.SocketInputStream.read(SocketInputStream.java:129)
>      [java]     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>      [java]     at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
>      [java]     at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
>      [java]     at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)
>      [java]     at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)
>      [java]     at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)
>      [java]     at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)
>      [java]     at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
>      [java]     at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
>      [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
>      [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
>      [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
>      [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
>      [java]     at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
>      [java]     at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
>      [java]     ... 11 more
> BUILD SUCCESSFUL
> Total time: 32 seconds
> skrall@skralldesktop ~/files/downloads/synapse/synapse-1.1.1/samples/axis2Client $ lsof
-p 27788 | wc -l
> 250
> skrall@skralldesktop ~/files/downloads/synapse/synapse-1.1.1/samples/axis2Client $ lsof
-p 27788 | grep pipe | wc -l
> 28

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message