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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:13:36+00:00 2026-06-16T00:13:36+00:00

Recently, I’ve noticed that my website is getting hit by a crawler, which takes

  • 0

Recently, I’ve noticed that my website is getting hit by a crawler, which takes a very long time to open the pages. I never thought about it before but realized now that my MVC3 application never times out. For example, if I put in a Thread.Sleep(1000 * 60 * 10) (ten minutes) in my controller action and I open the page, after 10 minutes I will get rendered view.

I’ve read tons of articles and SO questions but no luck. I tried the solutions below on both localhost, and production server with “Release” built, but none of those did what I wanted it to do.

Solution 1:

In web.config:

<location path="ControllerName/ActionName">
    <system.web>
        <httpRuntime executionTimeout="1" />
    </system.web>
</location>

Solution 2:

In the controller action

HttpContext.Server.ScriptTimeout = 1;

The only idea I had left was to calculate the time that elapsed since the request came in and compare it to current time and if it’s bigger than my timeout limit, throw and TimeoutException() manually. I planned to put it in “OnActionExecution” and “OnActionExecuted” but if the request gets stuck somewhere in between those, I will never be able to tell if I should time it out.

Is there a good solution to implement this? Did anyone ever get request timeout to work in MVC3?

  • 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-06-16T00:13:36+00:00Added an answer on June 16, 2026 at 12:13 am

    I don’t think the timeout is a real problem here. I have a very strong suspicion that your site is hitting session locking issue, which is typical when being hammered by lots of simultaneous requests from the same source. Make sure you disable or mark session as readonly by default and only enable it on the actions where session is modified (like login controller for instance). See SessionStateAttribute for details.

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

Sidebar

Related Questions

Recently I noticed (after others have extended the project) that the compile time significantly
Recently, I was writing a class in which I discovered that I could reduce
Recently learning Android, there is a Handler class in android which is very useful.
Recently my iPad started to display these random characters when I open a website.
Recently (that is in winter in few days) I wrote a simple script which
Recently I noticed in WireShark I could see my FTP username/password that I used
Recently I was asked to develop an app, which basically is going to use
Recently launched a Magento store which features an image slider on the homepage. Works
recently I created a java class Custom Layout Manager , which I want to
Recently, I try to build WebKit with VS2012. That cost me a lot of

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.