Hi Igor,
I recently faced an issue with Cassandra store closing idle connections after some time. While investigating I found that this is caused by SessionPool and its SessionMonitor thread which closes sessions that were not acquired from the pool within 5 minutes. I have several questions regarding this: - What is the general idea behind this? - Why the timeout is not configurable? - Is it possible to add an option to disable this thread completely? Will this have any drawbacks? -Val |
Hi Val,
1) The genral idea is to have a session pool, cause closing and reopening Cassandra session each time is rather expensive operation. 2) I can easily add session expiration timeout as a parameter for Cassandra store. Will create a ticket for this. 3) It could be easily implemented ether, by closing and reopening session every time or just keeping opened sessions forever, but both approaches are bad. It's better to have a session pool and specify rather long session expiration timeout. Igor On Apr 12, 2017 2:48 AM, "Valentin Kulichenko" < [hidden email]> wrote: Hi Igor, I recently faced an issue with Cassandra store closing idle connections after some time. While investigating I found that this is caused by SessionPool and its SessionMonitor thread which closes sessions that were not acquired from the pool within 5 minutes. I have several questions regarding this: - What is the general idea behind this? - Why the timeout is not configurable? - Is it possible to add an option to disable this thread completely? Will this have any drawbacks? -Val |
Igor,
Thanks! I'm a bit in a rush with this, so already created a ticket [1] and assigned it to myself if you don't mind :) One more question though. Why exactly keeping sessions "forever" is bad? I expect store operations to happen while node is up, and currently if there is a pause larger than 5 minutes between consequent operations, I have to reopen connection which causes slowdown. I'm not sure what is the benefit of this and what are we trying to solve with this. Can you please clarify? [1] https://issues.apache.org/jira/browse/IGNITE-4954 -Val On Wed, Apr 12, 2017 at 5:47 PM, Igor Rudyak <[hidden email]> wrote: > Hi Val, > > 1) The genral idea is to have a session pool, cause closing and reopening > Cassandra session each time is rather expensive operation. > > 2) I can easily add session expiration timeout as a parameter for > Cassandra store. Will create a ticket for this. > > 3) It could be easily implemented ether, by closing and reopening session > every time or just keeping opened sessions forever, but both approaches are > bad. It's better to have a session pool and specify rather long session > expiration timeout. > > Igor > > > > On Apr 12, 2017 2:48 AM, "Valentin Kulichenko" < > [hidden email]> wrote: > > Hi Igor, > > I recently faced an issue with Cassandra store closing idle connections > after some time. While investigating I found that this is caused by > SessionPool and its SessionMonitor thread which closes sessions that were > not acquired from the pool within 5 minutes. > > I have several questions regarding this: > > - What is the general idea behind this? > - Why the timeout is not configurable? > - Is it possible to add an option to disable this thread completely? > Will this have any drawbacks? > > -Val > > > |
Hi Val,
Keeping session forever is not good cause it consumes resources on server and client side as well. On the client for example you have bunch of Netty threads. I think if you just specify session expiration timeout to some big value (1 day for example) it should be far enough. Igor On Wed, Apr 12, 2017 at 12:01 PM, Valentin Kulichenko < [hidden email]> wrote: > Igor, > > Thanks! I'm a bit in a rush with this, so already created a ticket [1] and > assigned it to myself if you don't mind :) > > One more question though. Why exactly keeping sessions "forever" is bad? I > expect store operations to happen while node is up, and currently if there > is a pause larger than 5 minutes between consequent operations, I have to > reopen connection which causes slowdown. I'm not sure what is the benefit > of this and what are we trying to solve with this. Can you please clarify? > > [1] https://issues.apache.org/jira/browse/IGNITE-4954 > > -Val > > On Wed, Apr 12, 2017 at 5:47 PM, Igor Rudyak <[hidden email]> wrote: > >> Hi Val, >> >> 1) The genral idea is to have a session pool, cause closing and reopening >> Cassandra session each time is rather expensive operation. >> >> 2) I can easily add session expiration timeout as a parameter for >> Cassandra store. Will create a ticket for this. >> >> 3) It could be easily implemented ether, by closing and reopening session >> every time or just keeping opened sessions forever, but both approaches are >> bad. It's better to have a session pool and specify rather long session >> expiration timeout. >> >> Igor >> >> >> >> On Apr 12, 2017 2:48 AM, "Valentin Kulichenko" < >> [hidden email]> wrote: >> >> Hi Igor, >> >> I recently faced an issue with Cassandra store closing idle connections >> after some time. While investigating I found that this is caused by >> SessionPool and its SessionMonitor thread which closes sessions that were >> not acquired from the pool within 5 minutes. >> >> I have several questions regarding this: >> >> - What is the general idea behind this? >> - Why the timeout is not configurable? >> - Is it possible to add an option to disable this thread completely? >> Will this have any drawbacks? >> >> -Val >> >> >> > |
Free forum by Nabble | Edit this page |