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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:10:42+00:00 2026-05-19T12:10:42+00:00

I’m having the strangest issue… I have a monorail website (a .NET solution, similar

  • 0

I’m having the strangest issue… I have a monorail website (a .NET solution, similar to ASP.NET MVC).. and on one of the pages there is a save button. When the save button is clicked, it executes some code to save the object to the database, and then redirects to another page. However, what it does is immediately after you click the save button, it executes all of the save code, and then it sits there for a while, and then it redirects to the other page and executes its code. Here are some facts about the situation that make it especially strange.

  1. Every time you go through the process of clicking save and waiting for it to finish and redirect, it takes 2-4 seconds longer than the previous time you tried. So first time it’ll take 2 seconds, then maybe 5, then 8, etc…
  2. If you recycle the app pool, it makes it run fast again, but then fact #1 kicks in and it gets slower the more times you do it.
  3. I added in logging and it executes the save and redirect code in 1 millisecond, then it waits for a while, and then it executes the new page’s code quickly.
  4. I tried changing it to redirect to google.com and it still behaves this way.
  5. I tried making it not redirect at all, just serve up the existing page again after saving, and it still behaves this way.
  6. Every time you click save, it spikes the cpu (specifically the w3wp process.)
  7. Other pages do not behave this way, even other save methods.
  8. Commenting out the code that saves to the database makes it work correctly, with no wait.

So does anyone have any idea what would cause this? The save code uses Active Record and NHibernate. The code itself runs super fast, like I said it’s less than 1ms, but it seems like there’s something happening asynchronously AFTER the code finishes executing that makes it hang for a long time..

Any ideas would be greatly appreciated, the code is at http://pastebin.com/XGLAWPgK.

  • 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-19T12:10:43+00:00Added an answer on May 19, 2026 at 12:10 pm

    My Monorail is a bit rusty …

    Are you disposing of your ActiveRecord/nHibernate context after every request or caching it in the Session state? You shold create a new context for every request.

    Are you Eager loading data entities? If you are Saving data, it may be fetching all associated entites.

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

Sidebar

Related Questions

No related questions found

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.