cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-7211) receiveTimeouts aren't respected anymore since 3.1.9 for requests < 1000ms duration
Date Tue, 17 Jan 2017 04:32:26 GMT

    [ https://issues.apache.org/jira/browse/CXF-7211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15824954#comment-15824954
] 

Freeman Fang commented on CXF-7211:
-----------------------------------

Hi Veit,

This is a good testcase and I get your point.
This is default expected behavior from org.apache.http.impl.nio.reactor.BaseIOReactor
{code}
    public BaseIOReactor(
            final long selectTimeout, final boolean interestOpsQueueing) throws IOReactorException
{
        super(selectTimeout, interestOpsQueueing);
        this.bufferingSessions = new HashSet<IOSession>();
        this.timeoutCheckInterval = selectTimeout;
        this.lastTimeoutCheck = System.currentTimeMillis();
    }
{code}
The timeoutCheckInterval = selectTimeout = 1000ms by default, so that if your request take
time less than 1000ms then the timeoutCheck won't be triggered as not meet the timeoutCheckInterval
yet.

Fortunately in CXF we can configure this value at bus level, so for your test case if you
add 
{code}
                        Bus bus = BusFactory.getDefaultBus();
		        bus.setProperty("org.apache.cxf.transport.http.async.selectInterval", 100);
{code}
in MyClientTest.java the test will pass.
NOTE, the default 1000ms is reasonable and make the value too small will cause performance
concern and you need trade off this yourself.

Freeman

> receiveTimeouts aren't respected anymore since 3.1.9 for requests < 1000ms duration
> -----------------------------------------------------------------------------------
>
>                 Key: CXF-7211
>                 URL: https://issues.apache.org/jira/browse/CXF-7211
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.1.9
>            Reporter: Veit Guna
>            Assignee: Freeman Fang
>            Priority: Minor
>         Attachments: test.zip
>
>
> Starting with 3.1.9 receiveTimeouts aren't respected anymore for requests that take less
than 1000ms using the async http conduit.
> See for details: http://cxf.547215.n5.nabble.com/receiveTimeout-ignored-since-3-1-9-tt5776188.html
> Please find attached a test project that demonstrates the issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message