1
Answer

Connection Timeout Error

Praveen K

Praveen K

16y
7.7k
1

Hi All,

I have created a Windows Service to process huge amount of data using Asynchronous Multi-threaded architecture using delegates.  I have set the connection pool size in the connection string as follows.

<add name="DBConnection" connectionString="Persist Security Info=False;database=TestBD;server=WIRECOM;Connect Timeout=30;user id=TestUser; pwd=Test;Pooling=true;Max Pool Size=20"/>

In the service, I am creating 'n' number of threads and trying to process the data.  It is processing the data initially and it will throuw the following error:

"error connecting: 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"

I have checked the connection pool status and found the connections are in 'Sleep' status. 

Please give your suggestions to solve this issue.

Thanks in Advance,

Answers (1)