Claudia Perez wrote:
I change it to ADO, and as far as I know I set up its connection string properly, but every time that wcf webservice receives a call, I can see 10 connections on my DB, which doesn't happen if I switch to Oracle.
That's because you specified 10 as the Min Pool Size. That's how many will get created whenever the pool is first created.
This is my Connection string for ADO .Net:
Namespace='Oracle.DataAccess.Client',DataSource='PICFE_DESAR',ID='myid',Password='mypwd',PBCatalogOwner='myowner',DateFormat='DD/MM/YYYY',DateTimeFormat='DD/MM/YYYY HH:MM:SS',TimeFormat='HH:MM:SS',TrimSpaces=1,DelimitIdentifier='No',PBMaxBlobSize=2147483647,CommitOnDisconnect='No',TimeOut=300,CommandTimeOut=300,DisableBind=0,OJSyntax='PB',PROVIDERSTRING='Pooling=TRUE; User Id=myid; Password=mypwd; Min Pool Size=10; Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=5;Decr Pool Size=2;'
Note that you've also set Incr Pool Size but no Max Pool Size. That means you're going to allow the pool to grow (particularly if you have a connection leak) until it hits the default Max Pool Size of 100.
For every call Connections are created and they live forever, so there's a point when no one can connect to Database 'cause it exceeded the connections limit.
Sounds like you have a connection leak. I would review the logic involved to ensure that the connections are really being disconnected when you're done with them.
You also need to make sure that the connection string is the same for each connection. If you're using user specific values for myid and mypwd, then the pool will grow to the size of the number of unique users who hit the service.
If you do have to provide unique userid/password information to the service, look at the Proxy Authentication feature of ODP.Net. That will ensure that the connection pool is using connections with the same userid/password but that authentication can be done application side using passed in values for userid/password.
Oracle Data Provider for .Net Developer Guide: Connecting to the Oracle Database