connection-pooling

Lock Ordering in C3p0

I am trying to log the creation and destruction of database connections in our application using c3p0's ConnectionCustomizer. In it, I have some code that looks like this: log(C3P0Registry.getPooledDataSources()) I'm running into deadlocks. I'm discovering that C3p0 has at least a couple objects in its library that use synchronized m...

Managing connection to database in an asp.net application

I would like to know, what would be the best way to manage a connection to a database in asp.net. My application is built using an N-Tier architecture. The DAL consists of static classes with methods such as Public Shared Sub Delete( _ ByVal connection As MyConnectionClass, _ ByVal contact_id As Integer, _ ByVal contact_tim...

difference between shareable and unshareable connection in jdbc connection pool?

We notice something strange in our struts web application which was hosted on sun app server enterprise edition 8.1. The NumConnUsed for Monitoring of JDBC resources stays at 100 over connections even though there was relatively very low user activities. I try to do some research and found the following links http://j2ee-performance.bl...

How to find out connection leaks?

We have a struts web application that is deployed on sun applicaition server that despite doing load test / system integrating test in development environments. There is no scenario of conneciton leak. But however in the production environment. There seen to be connection leak as the connection in used keep on increasing. Beside applic...

Django connection pooling and time fields

Has anyone got connection pooling working with Django, SQLAlchemy, and MySQL? I used this tutorial (http://node.to/wordpress/2008/09/30/another-database-connection-pool-solution-for-django-mysql/) which worked great but the issue I'm having is whenever I bring back a time field it is being converted to a timedelta since the Django-speci...

Web Services, ADO.NET Connection Pool, Timeout Error

If I have an .asmx Web Service that only exposes one call. One that takes a few params and inserts those values as a record in SQL Server 2005 table. What should that method look like to be as "kind" to the ADO.NET Connection Pool as possible? What should it look like if its going to be called maybe 10 times a second (spread out) over m...

tomcat connection pooling

Hi, I have a simple servlet running in Tomcat. Because the servlet connects to a database, I need to use connection pooling. However, all the examples on the internet assume that (the developer) will never change which database the servlet is connecting to. For example, here is a sample context.xml file. <?xml version="1.0" encoding="U...

How to enable OLEDB resource pooling in a Delphi 7 app

What needs to be done to enable pooling in a Delphi 7 app? My connection string is: Provider=SQLOLEDB.1;Initial Catalog=%s;Data Source=%s;Password=%s;User ID=%s;OLE Db Services=-1 I can tell that connection pooling is not being achieved by looking at the SQLServer:GeneralStatistics UserConnections performance counter - it fluctuates w...

proper design to share database connections across static classes?

I have a c# dll with a number of static utility classes. they all need database access, and at the moment each class has it's own connection. this is getting to be a hassle, and I'd like a single "provider" of connections, so a class could just do something like ConnProvider.Query(...) where ConnProvider is a static class accessible by a...

Is it possible to gets sql connection leaks using LINQ?

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 connec...

Using Prepared Statements and Connection Pooling together in MySQL

Presently, for each query, a Prepared Statement is created and reused. I am not using any connection pool. C3P0 is a widely recommended library for the same. But, as a PreparedStatement is tied to a connection. In the pooled environment, the connections are returned to the pool, effectively making PreparedStatement unusable. Am I corr...

Is there a way to release a saturated connection pool?

Hi, I'm working with open esb on a glassfish server. We have a connection pool that works with an as400 Database. Every couple of days we get this error: Error in allocating a connection. Cause: In-use connections equal max- pool-size and expired max-wait-time. Cannot allocate more connections The best way to relief the cp is to resta...

JBoss Database Connection Pool

I am new to jboss and i have been asked to incorporate jboss connection pooling mechanism with an existing web application. Considering that a web application database layer is properly written i.e. all resultsets, statements and connections being closed properly when not needed, What all code changes i will have to make in my web app af...

php connection pooling mysql

Hi, I am planning to use MYSQL. Is there a connection pooling extension available. or what is the normal practice for connection. is this the one used in every where... mysqli_connect("localhost", "xxx", "xxx", "test"); Do people use just normal msql_connect or pconnect..? how better is pconnect and what setting should I do for PConnec...

Comparison of JDBC Connection pools

Does anyone have any information comparing performance characteristics of different ConnectionPool implementations? Background: I have an application that runs db updates in background threads to a mysql instance on the same box. Using the Datasource com.mchange.v2.c3p0.ComboPooledDataSource would give us occasional SocketExceptions: ...

Connection pooling and single sign on

An ASP.NET 3.5 app with SQL Server 2005 must provide single sign on on intranet environment. This is done by using the Windows Authentication mode in the web.config. I want to use connection pooling as much as possible. I also want to use SSPI as database access in the connection string and not using impersonation (in the web.config) T...

What is the connection pool associated with?

I'm reading about connection pooling in .net and i'm not sure if i'm getting it right. They say that a closed connection is returned to the pool so that it can be reused later. But what is the pool associated with? Is it a database or just the application environment (computer it is executed on)? If it's the latter, then if you have two ...

Is there a way to share object between php pages?

I am new to php, but in other web technologies, you can share objects between page instances. For example, in java jsp pages you easily have on class that exist as static class for the whole server instance. How to do this in php? I am not refering to sessions variables (at least I don't think so). This is more for the purpose of resou...

Managing SQL Server Connections

What is the the best practice for sql connections. Currently i am using the following: using(SqlConnection sqlConn = new SqlConnection(CONNECTIONSTRING)) { sqlConn.Open(); //DB CODE GOES HERE } I have read that this is a very effective way of doing sql connections. By default the sql pooling in active so how i understand it is tha...

SELECT 1 from DUAL: MySQL

In looking over my Query log, I see an odd pattern that I don't have an explanation for. After practically every query, I have "select 1 from DUAL". I have no idea where this is coming from, and I'm certainly not making the query explicitly. The log basically looks like this: 10 Query SELECT some normal query 10 Query...