Is there a way to set the application timeout in ASP.NET Core 1/MVC 6?
What is the default time a site stays in memory without
activity on the site, haven't been able to locate documentation on
this?
I can see when the site spins up from the text log of the stdout but I'm not sure when it goes down or how I can extend (or shrink) that number programatically.
Is there a way to set the application timeout in ASP.NET Core 1/MVC 6?
I don't think so. Application timeouts would be set by the host (IIS example).
What is the default time a site stays in memory without activity on the site, haven't been able to locate documentation on this?
Again, this depends on the host. For IIS, the default time is 20 minutes. When you're debugging with Visual Studio, I'm not sure if it will timeout.
Related
I have an ASP.NET Core 3 application. I hosted it in IIS (10.0.17763.1) with Windows 2019.
The app is designed to call itself every 30 minutes, and it works well.
Days later, I found it says "Application is shutting down..." in the log, which happens periodically.
I searched and found the below article, and did what it says (print screen).
How to auto start and keep an ASP.NET Core web application running on IIS
However, shutting down still keeps happening.
How to resolve it?
Last Friday, I installed the "application initialization", so far the application is running well without shutting down.
I have an application where it seems that for different users there is a different timeout and for some users the timeout is too soon.
It is a C#/.NET application that runs an ASPX based Website. Basically, you fill out a form and click on submit and then must wait a few minutes and you get the results. When I am connected to the system and perform this action it takes around nine minutes and I see the results.
But if another user performs this action after five minutes he gets displayed a “This page can’t be displayed” message in is browser (internet explorer – the rest of the message is “Make sure the web address http:// … is correct, Look for the page with bing, Refresh the page in a few minutes”).
A little more background:
First the nine minutes seem long, but there is a huge amount of data (collection of datapoints over a span of a year) that is processed and displayed, and basically it works, so I don’t think it is necessary to discuss this point. For a lesser amount of data there are no problems.
The data from the database is obtained via C# and it performs the queries to a MS SQL database.
First I thought it would help to set in the web.config in the httpRuntime tag the executionTimeout attribute. But the compilation tag has the debug flag set to true (and the application is deployed as release via visual studio on the server) – so the debug flag (as far I understand) overrides the executionTimeout anyways.
The Server on which the application is running is Windows Server 2012 R2 and for the site I also set under IIS in the advanced settings in the behavior / limits area the connection timeout on a higher value. But this hasn’t any effect.
I think I am missing some point, because as far I understand the deployed application doesn’t have any timeouts set (because of the debug flag) and this behavior seems user specific.
Do you have any hints or ideas where I can look for?
Edit
In the comments was suggested to check the SQL Server logs for errors, the log was error free.
As it turned out, it was a problem due to an older version of the browser that had some strict timeout settings. By switching to another version, this behavior doesn't show anymore.
We have a ASP.NET 2.0 (i know it's old!) website hosted on a Windows 2003 server and IIS 6.0. The application periodically crashes after every two months.
We have tried to analyse the memory consumption and other things by using Telerik and very recently Riverbed.
Any idea what should we be looking for?
UPDATE: After searching the WWW I stumbled upon this a fix where they tell that we can increase the request queue limit to stop this issue. Although the root cause analysis is still desirable.
Well, we have an web application deployed on:
Windows Server 2012
IIS 8.
Target .net Framework 4.0
DevExpress Ver: 13.1.8 (third-party controls)
Now the issue is this, some of the pages stop responding when we try to load them. (after few time- not specific)
To make them in working again we have to restart 'World Wide Web Publishing Service' or sometime 'IIS' as well.
But after few hours, again the pages stop responding. Browser does't even give any error message, just keep trying
to load page and go in 'Waiting for Server Response' state.
And this behavior is not for all page. Even under this scenario some other pages still work. It means application is running
but some pages are note working.
I have also check that there is no dead lock at database level.
Also, IIS 8 is enable with both 3.5 and 4.5 options.
Note: We have some other applications on the same server running fine.
Can you please suggest me that how can I resolve this issue,
Thanks
Qazi
I suggest to create a Hello World! page and load it.
If the Hello World page even doesn't load, analyse the IIS log .
especially look at the value of "Win32Status" . If its not 0, use - net helpmsg [Win32StatusCode] in command line . This should give you enough clue for troubleshooting.
I suspect it is the HTTP Compression that is causing the issue; dump the HTTP Compression in Web Extensions, and then it will behave better.
Check also your CPU and RAM workload.
Is it possible to write a background function in a master page that triggers after a specific period of time, say 5 hours?
function()
{
execute code from the clsGeneral Class
}
Please suggest how this can be implemented.
Pre IIS 7.5 you don't. (technically you can, but it's stupid). IIS is free to terminate your app whenever he wants, and when IIS is restarted, apps are restarted "lazily" (until someone opens a page of your web app, the web app isn't started).
From IIS 7.5 onward you could using the Application Warm-Up Module (sadly the beta was removed :-) ). With it you create a Thread that waits the specified time and does something. Quite easy.
The "right" solution is normally to create a Windows Service and use Quartz. Read here for example Scheduler for ASP.NET?