Quantcast
Channel: SCN: Message List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 7329

Re: ADO .Net pooling creates connections on every call

$
0
0

Hi Bruce, first of all: thanks for taking the time to help me

 

I forgot to tell you I received 9 calls and no matter which value I have in Min Pool Size I always got 10 connections, at the end I left 10 as min value (coincidence).

 

Anyway I applied your suggestions leaving my connection string as:

 

Namespace='Oracle.DataAccess.Client',DataSource='mybd',ID='myuser',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='myuser'; Password='mypwd'; Min Pool Size=5; Max Pool Size=50; Connection Lifetime=0; Connection Timeout=15; Incr Pool Size=2;Decr Pool Size=2;'

 

I ran the app on debug mode with a breakpoint at the DISCONNECT statement (to be sure that there's no leak on my script, there's only one CONNECT and 2 DISCONNECT (ERROR HANDLER and SUCCEED):

 

* Call # 1: 5 (min pool size) connections are created

* Call # 2 - Call # 4: same 5 connections

* Call # 5 - 2 more connections (incr pool size) are created (I was expecting that it would use a connection from the pool)

* Call # 6 - same

* Call # 7 - 2 more

* Call # 8 - same

* Call # 9 - 2 more, for a total of 11 connections

 

All calls ended.

 

about 3 - 4 minutes after: 2 connections disappear

about 20 minutes later: the rest (9) are gone all at the same time.

 

I repeated this test on debug a lot of times, I was the only one using this webservice (is on my PC), I stopped the original webservice on the server, and I always got the same result.

 

On the other hand, it isn't supposed that using the Oracle Native Driver I should get the 5 connections at the beginning?, if I switch to Oracle only 2 connections are created, one lasts for a while, the other one shows and disappears as I'm moving through my script (connect/disconnect).

 

Another clue?

 

I'm not a web programmer (as you should notice by now), but I'm wondering if this has something to do with my IIS pool, that pool has an idle time of 20 minutes, but if this is the answer, isn't supposed that the connection is released to the pool (not used) when I DISCONNECT and then another instance of my app can use it?

 

P.D. User ID (and its PWD) are the same for all calls.


Viewing all articles
Browse latest Browse all 7329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>