DanielE 6/8/2010 6:07:44 PM

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool

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

Grrr. I've battled this little winner for a while, at different clients. To cause it, you write code that loops through a data set of some sort and sends one transaction at a time to Dynamics GP using eConnect. After 100 sends, you get a crash with the above error.

I thought the error was Connection Pooling, so I turned it on with something like this:

Pooling=true;Max Pool Size=100;Min Pool Size=5 ;Data Source=...

However, all these settings are the default so it really shouldn't have made any difference. And it didn't.

To be safe, I made sure that my code was disposing of the objects created like this:

        Dim eConnObject As New eConnectMethods

            eConnObject.eConnect_EntryPoint(cnString(server, db), EnumTypes.ConnectionStringType.SqlClient, Doc, EnumTypes.SchemaValidationType.None)
            eConnObject.Dispose()
            eConnObject = Nothing

Version: Unknown or N/A
Section: eConnect


Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3