Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Problem with connection pooling

Problem with connection pooling

Scheduled Pinned Locked Moved Database
helpcsharpdatabasesql-server
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nguyenvhn
    wrote on last edited by
    #1

    Dear all, I have a problem with connection pooling. I programmed in VB.NET with ADO.NET and SQL Server. Here is my code in one form: Dim conn as new SqlConnection(strConnectionString) conn.Open .... conn.Close There are 3 SqlConnection instance in my code. But If I run the form several times (about 25 times), it occurred an error: 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 am sure that I have closed conn as soon as posible, so I do not know why that error happend. Any comment are welcome. Thanks for reading.

    S 1 Reply Last reply
    0
    • N nguyenvhn

      Dear all, I have a problem with connection pooling. I programmed in VB.NET with ADO.NET and SQL Server. Here is my code in one form: Dim conn as new SqlConnection(strConnectionString) conn.Open .... conn.Close There are 3 SqlConnection instance in my code. But If I run the form several times (about 25 times), it occurred an error: 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 am sure that I have closed conn as soon as posible, so I do not know why that error happend. Any comment are welcome. Thanks for reading.

      S Offline
      S Offline
      S Akif Kamal
      wrote on last edited by
      #2

      It will only be caused if you have some connection left open Akif

      N 1 Reply Last reply
      0
      • S S Akif Kamal

        It will only be caused if you have some connection left open Akif

        N Offline
        N Offline
        nguyenvhn
        wrote on last edited by
        #3

        Thanks for answering. At last, I found the source of problem, beacause I turn on SQL Debuging mode in Visual Studio IDE. If I turn off that mode, the problem did not apprear again. Thanks

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups