users@grizzly.java.net

RE: Setting the writeTimeout in NIOConnection

From: Andrew MacGilvery <Andrew.MacGilvery_at_betfair.com>
Date: Thu, 22 Nov 2012 17:52:22 +0000

Hi Alexey,
                Not quite, the server starts writing the data, and then 30 seconds later, terminates the connection.
It this behaviour that makes me think that it is the writeTimeout, rather than a general connection timeout.

I tried to implement an IOStrategy to set the timeout on the connection via the TCPNIOTransport, but the only events that are being captured are SERVER_ACCEPT and READ, not WRITE..

I'm happy to replace the GrizzlyServerFactory code with a "manual" set up, please can you send me the config code?

Kind regards,
        Andy

From: Oleksiy Stashok [mailto:oleksiy.stashok_at_oracle.com]
Sent: 22 November 2012 17:39
To: users_at_grizzly.java.net
Subject: Re: Setting the writeTimeout in NIOConnection

Hi Andy,

correct me if I'm wrong, this happens when you can't write any data (even 1 byte) on the Connection during 30seconds.
Most probably it means the client is overloaded and stopped reading incoming data.

Is it the case?

I can send you the code, which may help you to increase the timeout, but in that case you will need to duplicate the Grizzly initialization code from GrizzlyServerFactory, because AFAIR it returns HttpServer, which has been started. And add HttpServer AddOn, which I can help you to implement.

WBR,
Alexey.

On 11/22/2012 03:31 PM, Andrew MacGilvery wrote:
Hi Oleksiy,

                I'm using HttpServer version v2.1.2, creating the server with com.sun.jersey.api.container.grizzly2.GrizzlyServerFactory (v1.11).

Kind regards,
        Andy

From: Oleksiy Stashok [mailto:oleksiy.stashok_at_oracle.com]
Sent: 22 November 2012 13:17
To: users_at_grizzly.java.net<mailto:users_at_grizzly.java.net>
Subject: Re: Setting the writeTimeout in NIOConnection

Hi Andy,

can you pls. give more details, which Grizzly version are you using, are you using core framework or HttpServer etc.

Thanks.

WBR,
Alexey.
On 11/22/2012 11:51 AM, Andrew MacGilvery wrote:
Hi All,
                I'm seeing problems sending largish datasets to service consumers.
After writing to the response for 30 seconds, the connection is closed.
I'd like to increase the writeTimeout in NIOConnection to see if it has any effect on the problem, but I haven't been able to find out how to do it.
What is the correct way to set this timeout?

Kind regards,
        Andy


________________________________________________________________________
In order to protect our email recipients, Betfair Group use SkyScan from
MessageLabs to scan all Incoming and Outgoing mail for viruses.

________________________________________________________________________


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________


________________________________________________________________________
In order to protect our email recipients, Betfair Group use SkyScan from
MessageLabs to scan all Incoming and Outgoing mail for viruses.

________________________________________________________________________