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 6912755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:07:54+00:00 2026-05-27T09:07:54+00:00

last year i developed an ASP.NET Application implenting MVP Model. The site is not

  • 0

last year i developed an ASP.NET Application implenting MVP Model.
The site is not very large (about 9.000 views/day).
It is a common application witch just desplays articles, supports scheduling (via datetime),vote and views, sections and categories.

From then i create more than 15 sites with the same motive ( The database michanism was build in the same logic).

What i did was :
Every time a request arrive i have to take articles, sections, categories, views and votes from my Database and display them to the user…like all other web apps.

My database objects are somthing like the above :

public class MyObjectDatabaseManager{
       public static string Table = DBTables.ArticlesTable;
       public static string ConnectionString = ApplicationManager.ConnectionString;
       public bool insertMyObject(MyObject myObject){/*.....*/}
       public bool updateMyObject(MyObject myObject){/*.....*/}
       public bool deleteMyObject(MyObject myObject){/*.....*/}
       public MyObject getMyObject(int MyObjectID){/**/}
       public List<MyObject> getMyObjects( int limit, int page, bool OrderBy, bool ASC){/*...*/}
}

When ever i want to communicate to the database i do something like the above

   MySqlConnection myConnection = new MySqlConnection(ConnectionString);
   try
      {
       myConnection.Open();
       MySqlCommand cmd = new MySqlCommand(myQuery,myConnection);
       cmd.Parameters.AddWithValue(...);
       cmd.ExecuteReader(); /* OR */ ExecuteNonQuery();
   }catch(Exception){}
   finally
    {
        if (myConnection != null)
        {
            myConnection.Close();
            myConnection.Dispose();
        }
    }

Two months later i’ve run into trouble.

The performance start falling down and the database starts to return errors : max_user_connections

Then i think.. ” Let’s cache the page ”
And the start to use Output cache for the pages.
(not a very sophisticated good idea..)

12 months later my friend told to me to create a “live” article…
an article that can be updated without any delay. (from the output cache…)

Then it came into my mind that : ” Why to use cache? joomla etc **doesn’t”

So…i remove the magic “Output cache” directive…
From then i run again into the same problem…
MAX_USER_CONNETCTIONS! :/

What i’m doing wrong?

I know that my code communicates alot with the database but…
the connection pooling?

Sorry for my english

Please…help :/
i have no idea how to figure it out:/

Thank you.
I’m running into share hosting packet
*My db is over 60mb in size*
I have more than 6000 rows in some tables like articles
*My hosting provider gives me 25 connections to the database (very large number in my opinion)*

  • 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-27T09:07:54+00:00Added an answer on May 27, 2026 at 9:07 am

    Your code looks fine to me, although from a style perspective I prefer “using” to “try / finally / Dispose()”.

    One thing to check is to make sure that the connection strings you’re using are identical, everywhere in your code. Most DB drivers to connection pooling based on comparing the connection strings.

    You may need to increase the max_connections variable in your mysql config.

    See:

    http://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html

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

Sidebar

Related Questions

Last year we moved all our new functionality to ASP.NET MVC. However we still
Last year I developed a data access service for our project using Entity Framework
Last year, my group developed a web service that included basic search functionality. All
Well, a year back I developed an agent module for net-snmp to monitor disk
Last year I made an Android application that scrapped the informations on my train
Last year we launched http://tweetMp.org.au - a site dedicated to Australian politics and twitter.
I've posted about this last year because some university project and now I have
I was using JavaFX 1.2 last year. As the Model part of my app
I've been developing .Net pages for business web apps for the last year or
Last year, Scott Guthrie stated You can actually override the raw SQL that LINQ

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.