Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectionLifetime with value 0 (zero) is no longer treated as infinite but really as zero. [DNET552] #526

Closed
firebird-automations opened this issue Apr 17, 2014 · 4 comments

Comments

@firebird-automations
Copy link

Submitted by: Erik Jan Meijer (eegee)

In NETProvider\NETProvider\source\FirebirdSql\Data\FirebirdClient\FbConnectionPoolManager.cs , Pool.CleanupPool() does the following:

var keep = available.Where(x => x.Created.AddSeconds(_connectionString.ConnectionLifeTime) > now).ToArray();

This does not take into account the default(!) value of zero for _connectionString.ConnectionLifeTime.

The effect is that connections are closed and recreated for every request.
You can see TCP-connections closing and new ones reopening by using TcpView by SysInternals.

Commits: 62e1df8 e5b1556

@firebird-automations
Copy link
Author

Commented by: @cincuranet

Maybe it's also good to change the default value to something reasonable. Like 10 seconds. What you think?

@firebird-automations
Copy link
Author

Commented by: Erik Jan Meijer (eegee)

I think that depends on the situation, the context in which the connections are made and how much the connection will be used. Someone could want a lifetime of 10 seconds, but others 60 seconds or maybe longer, like infinite.

I'd say, don't change it and leave it to zero (i.e. infinite).

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: In Progress [ 3 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: vNext [ 10640 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants