Thanks you, Oleg. Would you mind telling me how to turn on I/O event logging?
________________________________________ From: Oleg Kalnichevski [[email protected]] Sent: Monday, April 28, 2014 9:28 AM To: HttpClient User Discussion Subject: Re: Timeout when sending on slow link On Sat, 2014-04-26 at 19:52 +0000, Boxer, Aaron wrote: > Hello List, > > I am using the latest version of httpasynchclient to send six 13 MB files > over a 10 MBPS link. > My timeout is set to 30 seconds, and I am getting timeout errors, in the > following timeout handler: > > protected void timeoutCheck(final SelectionKey key, final long now) { > final IOSessionImpl session = (IOSessionImpl) key.attachment(); > if (session != null) { > final int timeout = session.getSocketTimeout(); > if (timeout > 0) { > if (session.getLastAccessTime() + timeout < now) { > sessionTimedOut(session); > } > } > } > } > > Setting my timeout to 2 minutes fixes these timeout errors: > > IOReactorConfig ioReactorConfig = IOReactorConfig.custom() > .setIoThreadCount(Runtime.getRuntime().availableProcessors()) > .setConnectTimeout(120000) > .setSoTimeout(120000) > .setTcpNoDelay(true) > .build(); > > > Is this reasonable to get timeout errors with a 30 second timeout? > Is there anything else I can configure to prevent a timeout? > > > Over 10 MBPS, each file should take about 15 seconds to send. But, since all > files are being sent asynchronously, > is it true that each file may take a lot longer to send, since there are > other concurrent sockets active? > > Thanks very much, > Aaron Hi Aaron I think it is conceivable that a particular connection may get no i/o activity for a considerable period of time on a slow link with a high concurrency level. I do admit that 30 seconds sound a bit too extreme, so it can also be a defect in the I/O reactor layer. You might want to run your application with I/O event logging on and analyze i/o activity of a particular connection. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
