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

  • SEARCH
  • Home
  • 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 7434101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:46:46+00:00 2026-05-29T09:46:46+00:00

I have an asp.net web page which interacts with a SQL Server database, grabs

  • 0

I have an asp.net web page which interacts with a SQL Server database, grabs some data and then returns an XML response (which I feed into Freeswitch using xml_curl).

Because Freeswitch (FS from now on) does not store cookies, each request creates a new session.

When the number of requests gets too much (about 97 to 100), the SqlConnection.Open() method gets timeout from the SQL Server Instance, which then results in HTTP Error 500.

To test my assumption, I have created a small script using PHP and cURL, which make repeated requests to my asp.net page. If I store cookies (and thus sessions) in the PHP script I can make 10000 successful requests in almost 314 seconds.

But without sessions, I get stuck at about 97~100 requests, and then I get HTTP Error 500.

Is there anyway to overcome this problem?

==Edit==
Here is how I interact with the database:

String connectionString = WebConfigurationManager.ConnectionStrings["SqlServerConnection"].ConnectionString;
SqlConnection connection = new SqlConnection(connectionString);
SqlCommand command = connection.CreateCommand();
command.CommandType = CommandType.Text;
command.CommandText = "Select * from dbo.Template where Name = '" + name + "'";

Template template = new Template();

connection.Open();

SqlDataReader reader = command.ExecuteReader();


if (reader.HasRows)
{
    reader.Read();
    template.Name = reader["Name"].ToString();
    template.XMLContent = reader["XMLContent"].ToString();
}
else
{
    template.Name = "";
    template.XMLContent = "";
}

reader.Close();
connection.Close();

return template;

And the Template table has these fields:

ID => int, identity, primary key
Name => nvarchar(255), unique
XMLContent => ntext
  • 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-29T09:46:47+00:00Added an answer on May 29, 2026 at 9:46 am

    It appears you are using a connection pool. By default these pools have a max of 100 connections to your SQL server and queue any additional connections. The queue has a timeout (default 15 seconds) which can be extended if you wish to queue your requests longer. This means that you might get backed up on your server. You can also increase the pool max size if your SQL server can handle it.

    Here is how you increase your connection settings by adding these parameters:

    • Timeout=60
    • Max Pool Size=150
    • etc etc
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a Web application (ASP.NET) which displays in some page links to miscellaneous
I have a ASP.NET web page that needs to make a SQL Server call
I have an ASP.Net web page, which uses a Master Page template. The page
I have a ASP.NET web application which has more than 100 pages. Each page
I have an asp.net web page written in C#. Using some javascript I popup
I have a ASP.NET (C#) web page which utilizes a VB class library. The
I have a ASP.NET (C#) web page in which I want to enumerate a
I have a ASP.NET 1.1 web application page which is built with .net framework
I have an ASP.NET web service which does some heavy lifting, like say,some file
I have user control on a ASP.NET web page, which contains a GridView and

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.