Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3613088
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:04:48+00:00 2026-05-18T22:04:48+00:00

I am using a foreach loop in SSIS to iterate over the contents of

  • 0

I am using a foreach loop in SSIS to iterate over the contents of a folder, executing a SQL Task for each file.

When I do this, it works fine the first ~300 times through the loop, then it hangs and says:

Error: 0xC002F210 at ______, Execute SQL Task: Executing the query "[__].[dbo].[_______]" 
failed with the following 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.". Possible failure reasons: Problems with the 
query, "ResultSet" property not set correctly, parameters not set correctly, or connection not
established correctly.

I’d imagine that this means that the old tasks are closing too slowly? The real kicker is that if I then add another SQL Task (inserting a blank string into a tmp table, using the same connection) before the task that is failing, the whole thing will work just fine. This isn’t a good solution though, and I am hoping to figure out if there is a known workaround or if I am doing something very foolish.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:04:49+00:00Added an answer on May 18, 2026 at 10:04 pm

    There’s an option in the connection manager to reuse the existing connection. Maybe changing this setting will help.

    Select properties for your connection manager and set the RetainSameConnection property to True.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to iterate (through foreach preferably) over a collection using reflection?
I have following foreach-loop: using System.IO; //... if (Directory.Exists(path)) { foreach(string strFile in Directory.GetFiles(path,
I'm using the following syntax to loop through a list collection: For Each PropertyActor
For Each line As String In System.IO.File.ReadAllLines(file.txt) 'Do Something' Next and Using f As
i want to post dynamically generated multiple text box using php by foreach loop.
Can someone share a simple example of using the foreach keyword with custom objects?
I'm trying get values from a GridView using the following code: foreach (GridViewRow row
Is there a way to do the following using LINQ? foreach (var c in
Currently, I'm using: DataTable dt = CreateDataTableInSomeWay(); List<DataRow> list = new List<DataRow>(); foreach (DataRow
Using .NET 1.1, I have a DataGrid that contains three columns for each row.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.