You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Amit Pundir <am...@gmail.com> on 2017/07/19 19:55:57 UTC

Large value of idleConnectionTimeout in TcpCommunicationSpi

Hello Everyone,

One of our cache access pattern is that it is accessed beyond an interval of
30 seconds (which is the default connection timeout). Every time it happens
the first call to the cache takes a long time to fetch the results.

I am planning to increase the idleConnectionTimeout to a big value (may be a
few hours) so that as long as users are active, they can access the system
without suffering from long wait every 30 seconds.

My question are - 
1. Is this approach ok? 
2. What are the potential issues with this approach?
3. If the client node (i.e. tomcat) shuts down what happens to the stale
connections? What could be the repurcussions if the server node tries to
access that cached connection?
4. Does this property (idleConnectionTimeout) needs to be set up only on
Ignite server nodes? And not on the Ignite client nodes?

We are using Ignite 2.0.


Thanks



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Large-value-of-idleConnectionTimeout-in-TcpCommunicationSpi-tp15138.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Large value of idleConnectionTimeout in TcpCommunicationSpi

Posted by vkulichenko <va...@gmail.com>.
Amit,

I think I already answered that :) See above.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Large-value-of-idleConnectionTimeout-in-TcpCommunicationSpi-tp15138p15206.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Large value of idleConnectionTimeout in TcpCommunicationSpi

Posted by Amit Pundir <am...@gmail.com>.
Hi Val,
So do you think we can keep a bigger value for idleConnectionTimeout (few
hours) without any untoward behavior? Please suggest.


Thanks



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Large-value-of-idleConnectionTimeout-in-TcpCommunicationSpi-tp15138p15202.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Large value of idleConnectionTimeout in TcpCommunicationSpi

Posted by vkulichenko <va...@gmail.com>.
Yes, you're right. Apparently I was looking at the wrong version of the code.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Large-value-of-idleConnectionTimeout-in-TcpCommunicationSpi-tp15138p15195.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Large value of idleConnectionTimeout in TcpCommunicationSpi

Posted by Amit Pundir <am...@gmail.com>.
Hi Val,
Thanks for the response. 

I don't think the default idleConnectionTimeout for TcpCommunicationSpi is
10 mins. I looked in the code and it is set to 30 seconds by default.

We were able to establish the pattern for this issue by changing the
idleTimeout to different values like 30 secs, 60 secs, 90 sec.

Thanks

/From the source code/ - TcpCommunicationSpi.java

/** Default idle connection timeout (value is <tt>30000</tt>ms). */
    public static final long DFLT_IDLE_CONN_TIMEOUT = 30000;
	
	
	public TcpCommunicationSpi setIdleConnectionTimeout(long idleConnTimeout)
{}




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Large-value-of-idleConnectionTimeout-in-TcpCommunicationSpi-tp15138p15166.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Large value of idleConnectionTimeout in TcpCommunicationSpi

Posted by vkulichenko <va...@gmail.com>.
Amit,

Default idle timeout is actually 10 minutes. Therefore connection will be
closed only it is not used for at least 10 minutes, not 30 seconds. Are you
sure that delay is caused by reopening a closed connection? If yes, are you
sure it's caused by idle timeout?

Answering your questions:
1. Generally it's OK, but I recommend you to investigate more first. What
you tell doesn't sound right.
2. The only drawback is that you spend resources on a connection that is not
used. In most cases this is not an issue.
3. If one of the parties shuts down, connection is closed anyway.
4. On all nodes.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Large-value-of-idleConnectionTimeout-in-TcpCommunicationSpi-tp15138p15143.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.