connection-pooling

Should I disconnect() if I'm using Apache::DBI's connect_cached()?

大憨熊 提交于 2019-12-19 12:06:00
问题 My mod_perl2-based intranet app uses DBI->connect_cached() which is supposedly overridden by Apache::DBI 's version of the same. It has normally worked quite well, but just recently we started having an issue on our testing server--which had only two users connected--whereby our app would sometimes, but not always, die when trying to reload a page with 'FATAL: sorry, too many clients already' connecting to our postgres 9.0 backend, despite all of them being <IDLE> if I look at the stats in

Connection Pooling over New Connection instance per Thread (JDBC)

我是研究僧i 提交于 2019-12-19 09:55:31
问题 I am creating a multi-threaded application. However, I have experienced lots of unexpected behavior from my application when I have one connection object serving all threads. I am in a dilemma. Should I let every thread create, use and dispose its own connection object or should I use a connection pool? I have tried connection pooling which makes the application painfully shower. However, my intuition is that if I let every thread create its own connection object, I might get a "too many

What is maximum allowable value of “Max Pool Size” in sql connection string

旧城冷巷雨未停 提交于 2019-12-19 05:16:52
问题 What is the maximum allowable value of "Max Pool Size" in a connection string? Suppose this is my connection string in app.config <add name="Name" providerName="System.Data.SqlClient" connectionString="Data Source=ServerName;Network Library=DBMSSOCN;Initial Catalog=DatabaseName;user=UserName;password=Password;Max Pool Size=1024;Pooling=true;"/> What is the maximum value I can use instead of 1024? Remember it is maximum value, not default value. 回答1: There is no documented limit on Max Pool

Should i use Pooling=False in Entity Framework Connection String?

旧时模样 提交于 2019-12-19 04:14:38
问题 We have an ASP.Net MVC3 application that is running on Azure, connecting to a Sql Azure Database via Entity Framework. The Developer that produced this has Pooling=False in the connection string. I would have thought this was a bad idea - wouldn't we want to re-use the connections if possible? Can anyone give me some guidance of when this might be a good idea? Thanks! 回答1: Yes, it is bad idea to have pooling=False. I don't use this option even for development. You should always use the SQL

Closing a “local” OrientDB when using connection pools

非 Y 不嫁゛ 提交于 2019-12-19 03:36:09
问题 So I basically do this. OObjectDatabaseTx result = OObjectDatabasePool.global().acquire( "local:orientdb", "admin", "admin"); //dostuff result.close; The problem is that when I redeploy my webapp (without restarting the Java EE container) I get the folling error: com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage 'orientdb' with mode=rw which I interpret to mean "Tomcat still has a filelock from the last app". So my question is how do I cleanly exit in

Hibernate connections are not closed even with C3P0 + explicit session.close()

寵の児 提交于 2019-12-19 03:22:39
问题 Hibernate connections to MySQL my db are not closing. After clicking 10 times in like 10 second, I get this connection statistics from MySQL Workbench (in my development machine. I'm the only user).MySQL Workbench Server Status I have those in place C3P0 and running (checked from log4j, no problem related to C3P0 and seems running) A ServletReqestListener which checks if there's an open session and closes it in requestDestroyed() method. Hibernate Session object is being kept in ThreadLocal,

Is it possible to gets sql connection leaks using LINQ?

拥有回忆 提交于 2019-12-19 02:49:24
问题 I belived it was not possible to get sql connection leaks when using LINQ, but perfmon tracing of NumberOfReclaimedConnections shows a high number and on high load we sometimes get exceptions like "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached". We do not use Dispose on the datacontexts, sincewe used defered loading. Several articles and blogpost tells

Defining an alternate connection pool in Grails 2.3.6

醉酒当歌 提交于 2019-12-19 02:42:30
问题 I know that, at some point between Grails 1.X and Grails 2.X, the default connection pooling library changed from commons-dbcp to tomcat-dbcp . Now, I'm trying to configure either BoneCP or HikariCP as the connection pooling library for my Grails application. However, I see that this answer offers a solution which might only apply to Grails 1.X. I also found this Gist, but again, I don't know which Grails version it applies to. So, is it possible to define a custom connection pool inside a

Defining an alternate connection pool in Grails 2.3.6

落花浮王杯 提交于 2019-12-19 02:42:13
问题 I know that, at some point between Grails 1.X and Grails 2.X, the default connection pooling library changed from commons-dbcp to tomcat-dbcp . Now, I'm trying to configure either BoneCP or HikariCP as the connection pooling library for my Grails application. However, I see that this answer offers a solution which might only apply to Grails 1.X. I also found this Gist, but again, I don't know which Grails version it applies to. So, is it possible to define a custom connection pool inside a

Heroku + Sidekiq: ActiveRecord::StatementInvalid: PG::UnableToSend: SSL SYSCALL error: EOF detected

跟風遠走 提交于 2019-12-18 14:13:04
问题 Hi we are running on Heroku's Cedar stack with Unicorn and Sidekiq. We intermittently get the following errors BurnThis ActiveRecord::StatementInvalid: PG::UnableToSend: SSL SYSCALL error: EOF detected ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() SSL SYSCALL error: Connection timed out Does anyone have any insight what the direct cause of these errors? Is it too many connections to our database? We have our forking set up already in the following way: unicorn.rb worker