connection-pooling

Is DB connection pooling all that important?

房东的猫 提交于 2019-12-04 15:58:23
In the Java world it is pretty standard for app servers to pool "expensive" resources, like DB connections. On the other hand in dynamic languages, most stacks have little to do with pooled resources and especially DB connections. E.g. for the popular PHP+MySQL combo, I've rarely seen it used with persistent connection, which can be considered poor-mans pooled connections. If the concept of pooling DB connections is not that widely implemented, does this mean that the performance/scalability gains might not be all that important, in real-life deployments? The main reason for connection pooling

SQL Server connection pool doesn't detect closed connections?

╄→гoц情女王★ 提交于 2019-12-04 15:57:42
问题 For years, I've experienced very weird problems on all my web applications that connect to a SQL server. The problem is that if something happens to the database server (server restart or other problem), de web app stops working from that point on, even if the database server is alive and well afterwards. What happens is that every ADO.NET operation (ExecuteNonQuery, CreateReader, BeginTransaction, ...) fails with a InvalidOperationException : " Invalid operation. The connection is closed ".

Oracle data source connection pooling not working used with Spring and JDBCTemplate

五迷三道 提交于 2019-12-04 15:56:51
Question: Lot of active unclosed physical connections with database even with connection pooling. Can someone tell me why is it so? I configured the connection pool settings using oracle.jdbc.pool.OracleDataSource . However it seems the physical connections are not getting closed after use. I thought, Since it is connection pooling, the connections will be reused from the pool, so so many physical connections will not be made, but thats not what is happening now! There are 100+ active physical connections in the database generating from the application [not from plsql developer or any such

Postgresql connection pooling in Erlang

☆樱花仙子☆ 提交于 2019-12-04 15:06:44
I am looking for a robust connection pooling library for Postgresql. Something similar to https://github.com/dweldon/riakpool would be great. 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

Externalizing tomcat jdbc connection pool information for different environments

孤者浪人 提交于 2019-12-04 15:01:21
Greetings, I'm looking for a good solution for externalizing the JNDI connection pool information in context.xml of a war so that as the application moves from dev to QA to prod, the war file won't need to be recompiled. Ideally the url, driver, username and password would be variablized and then populated by means of a properties file that would customized for each environment. If this isn't possible, are there other suggestions on how to handle moving a war across environments without recompiling for a target environment? Maven provides profiles this requires a build targeted at a specific

How to log Tomcat 7 JDBC connection pool, connection creation

梦想的初衷 提交于 2019-12-04 13:49:36
I'm trying to debug what seems to be an excessive number of database connections being opened and closed despite the fact that we are using the Tomcat 7 JDBC connection pool. How can I log when calling getConnection() on the data source results in a new connection being opened versus an existing connection being borrowed from the pool? I have faced a similar case today. I log through slf4j, and my problem was caused by hibernate. What I've done is setting up in the log configuration the space where the JDBC connection getter is called. Fortunately, for hibernate there are logs at debug level

Spring Cloud: Feign and Http Connection Pooling

喜欢而已 提交于 2019-12-04 13:27:40
问题 Can anyone please tell me if the Spring Cloud Feign Client provides or supports Http Connection Pooling, and if so how to configure settings like pool size? I can't seem to find this in the official documentation. Thank you. 回答1: From investigation I will try to answer my own question: Spring Cloud Feign uses Netflix Feign. Netflix Feign in turn creates connections using java.net.HttpURLConnection which makes use of 'persistent connections' but not a connection pool. It is possible to

NHibernate and ADO.NET Connection Pooling

微笑、不失礼 提交于 2019-12-04 11:39:39
问题 It seems that NHibernate does not pool ADO.NET database connections. Connections are only closed when the transaction is committed or rolled back. A review of the source code shows that there is no way to configure NHibernate so that it is closing connections when the ISession is disposed. What was the intent of this behaviour? ADO.NET has connection pooling itself. There's no need to hold them open all the time within the transaction. With this behaviour are also unneccessaryly distributed

Spring Connection Pooling [closed]

拟墨画扇 提交于 2019-12-04 11:27:08
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Can someone tell me or point me to a document/tutorial that explains how to use connection pooling in Spring? 回答1: Spring doesn't

Why a connection pool of many opened connections is less costly for a system than to open a new connection every time?

限于喜欢 提交于 2019-12-04 11:17:34
An answer from here Typically, opening a database connection is an expensive operation, so pooling keeps the connections active so that, when a connection is later requested, one of the active ones is used in preference to opening another one. I understand the concept of Connection Pool in DB management. That is the answer for a " what is ~ " question. All developers blog posts, answers, tutorials, DB docs out there always answer for a question " what is ". Like they constantly copy/paste text from one another. Nobody tries to explain " why is it so " and " how ". The answer above is an