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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:01:20+00:00 2026-05-23T15:01:20+00:00

we are having some connection pool issues with Nhibernate on an MVC3 web application

  • 0

we are having some connection pool issues with Nhibernate on an MVC3 web application which is running with SQL Express and dealing with multiple concurrent AJAX based requests.

Every so often (hours in between) we see errors starting which show:

NHibernate.Util.ADOExceptionReporter
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.

then a load of

While preparing select TOP (@p0)
….
an error occurred

We have to recycle the IIS app pool to stop 500 errors from being thrown after that.

Looking at the SQL Server we see:

select * from sys.dm_exec_sessions

… gives about 30 sessions with IDs above 51 (i.e. user sessions)

select * from sys.dm_exec_connections 

… gives around the same amount

BUT

select @@connections

… gives results with 79022

Is this indicating that the connections are never released?

The Nhibernate sessions are for the lifetime of the request.

Does anyone have any experience of anything like this or can point us in the right direction?

Many thanks

Richard

  • 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-23T15:01:21+00:00Added an answer on May 23, 2026 at 3:01 pm

    You can’t have more then 32767 connection to SQL Server.

    @@CONNECTIONS also gives (my bold)

    Returns the number of attempted connections, either successful or unsuccessful since SQL Server was last started.

    Not current connection

    I suspect that your pool is not set up correctly so it’s exhausted too quickly.

    Or you are not releasing connections correctly and you’re checking SQL Server after you recycle IIS.

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

Sidebar

Related Questions

I have been having some issues with LINQ-To-SQL around memory usage. I'm using it
I'm having some issues create a connection to (and reading from) a Tibco EMS
We've been having some issues with a SharePoint instance in a test environment. Thankfully
I'm having some problems integrating MS MapPoint 2009 into my WinForms .Net 2.0 application
I am having some 10 lac records in my single SQL Table. I need
I'm having some issues with producing an int matrix without creating memory leaks. I
I'm having some inheritance issues as I've got a group of inter-related abstract classes
I really am having a nightmare configuring Tomcat to set up a connection pool.
I am writing a prototype TCP connection and I am having some trouble homogenizing
Im having some problems sending mail. I have a ubuntu server running postfix as

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.