connection-pooling

Connection Pooling with Access database

耗尽温柔 提交于 2020-01-14 09:07:07
问题 I have an application which reads data from an Access databse frequently, is there any way to use connection pooling? My Open Databse method:- private bool OpenDatabaseConnection(string databaseName) { try { string connectionString = "Provider = Microsoft.Jet.OLEDB.4.0; " + "Data Source = " + databaseName + ";"; settingsDbConn = new OleDbConnection(connectionString); settingsDbConn.Open(); } catch (Exception) { return false; } return true; } 回答1: I concur with the comment of @sll but, to

Database Connection does not release after idle time out in glassfish

我与影子孤独终老i 提交于 2020-01-14 06:17:03
问题 i am using Glassfish 3 & mysql5.6.11. i have created JDBC connection pool in glassfish . Initial and Minimum Pool Size: - 8 Maximum Pool Size: -30 Pool Resize Quantity:- 10 Idle Timeout: - 60 (second). Max Wait Time:- 2500 (millisecond). with this parameter i have created pool setting . i have set pool resize quantity value . when no of connections increase, it does not release after idle time-out. next time when i hit url it again increase no of connection, it does not reuse already open

How could I check the number of active sqlalchemy connections in a pool at any given time?

陌路散爱 提交于 2020-01-13 09:21:32
问题 I have a situation where sqlalchemy keeps running out of active connections from time to time due to high traffic loads, and I would like to run some tests to verify and optimize the pooling parameters per our use case. However, I cannot find a straightforward way of polling for the count of active connections. Current setup is on the lines: args = ... mapping = { 'pool_size': 10, 'max_overflow': 10, 'pool_timeout': 30, 'pool_recycle': 1800 } engine = sqlalchemy.create_engine(*args, **mapping

Detecting unusable pooled SqlConnections

随声附和 提交于 2020-01-13 06:57:49
问题 When I attempt to set an application role on a SqlConnection with sp_setapprole I sometimes get the following error in the Windows event log... The connection has been dropped because the principal that opened it subsequently assumed a new security context, and then tried to reset the connection under its impersonated security context. This scenario is not supported. See "Impersonation Overview" in Books Online.) ... and a matching exception is thrown in my application. These are pooled

Postgresql connection pooling in Erlang

蹲街弑〆低调 提交于 2020-01-13 05:36:14
问题 I am looking for a robust connection pooling library for Postgresql. Something similar to https://github.com/dweldon/riakpool would be great. 回答1: Poolboy is a pretty good general-purpose pooling library: https://github.com/devinus/poolboy It comes with an example of how to use it with pgsql (scroll down the README file). 来源: https://stackoverflow.com/questions/7767415/postgresql-connection-pooling-in-erlang

Postgresql connection pooling in Erlang

做~自己de王妃 提交于 2020-01-13 05:36:12
问题 I am looking for a robust connection pooling library for Postgresql. Something similar to https://github.com/dweldon/riakpool would be great. 回答1: Poolboy is a pretty good general-purpose pooling library: https://github.com/devinus/poolboy It comes with an example of how to use it with pgsql (scroll down the README file). 来源: https://stackoverflow.com/questions/7767415/postgresql-connection-pooling-in-erlang

NHibernate.ADOException: could not execute query --> System.IndexOutOfRangeException: id13_

假如想象 提交于 2020-01-07 03:15:06
问题 I've got a really simple class that is giving a strange error. It's quite simple one and has no relationship with another table. The strangest part is that seems to happen randomly but especially when my website had heavy load of requests... I use Nhibernate that is version 2.0.1.400. I had a search on net about it and most of them who had same problem say that is highly a bug of Nhibernate on forums... Anyone had have this kind of problem before? and came with a solution? Could this be a

NHibernate.ADOException: could not execute query --> System.IndexOutOfRangeException: id13_

99封情书 提交于 2020-01-07 03:14:25
问题 I've got a really simple class that is giving a strange error. It's quite simple one and has no relationship with another table. The strangest part is that seems to happen randomly but especially when my website had heavy load of requests... I use Nhibernate that is version 2.0.1.400. I had a search on net about it and most of them who had same problem say that is highly a bug of Nhibernate on forums... Anyone had have this kind of problem before? and came with a solution? Could this be a

MQTT (Mosquitto) Connection pool?

蹲街弑〆低调 提交于 2020-01-06 20:24:29
问题 What would you suggest for Mosquitto connection pooling in Java? We are wasting (blocking) too much time on establishing each connection, so we think some kind of reuse would be better. 回答1: I'd suggest using the generic object pooling in the Apache commons tools https://commons.apache.org/proper/commons-pool/ But also you could extend Thread to instantiate a MQTT connection object on creation and have a persistent connection per thread. This could be combined with the built in thread pool in

MQTT (Mosquitto) Connection pool?

青春壹個敷衍的年華 提交于 2020-01-06 20:24:15
问题 What would you suggest for Mosquitto connection pooling in Java? We are wasting (blocking) too much time on establishing each connection, so we think some kind of reuse would be better. 回答1: I'd suggest using the generic object pooling in the Apache commons tools https://commons.apache.org/proper/commons-pool/ But also you could extend Thread to instantiate a MQTT connection object on creation and have a persistent connection per thread. This could be combined with the built in thread pool in