Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1480
  • Last Modified:

ASP.net 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

Hi All,

I had develop a application in asp.net with C#.
The theme of application is sending mail with Image(not an attachment).
I have a database more than 5000 emails.
When Iam running this application It's sending mails around 100 and then Iam getting Exception like this :
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.
0
mannevenu
Asked:
mannevenu
1 Solution
 
Joep_KillaarsCommented:
Can you post the code ? It sounds like you open a new connection every time you retrieve an address from your database.
0
 
badalpatelCommented:
hey, please close the connection object once it is been used..
Ex. con.close()
You are not closing the connection and creating a new connection everytime in a loop. And thats reason why u r getting that error.
0
 
mannevenuAuthor Commented:
Thanks Dear Patel
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now