Web Server in IIS stops time after time - web-services

I have developed a web service in c# (ASP.NET), and published it in IIS 6.1 (Windows Server 2008). Web application takes data from this web service, but time after time it does not return anything. After I restart web service it works again normally. I don't understand why web service stops returning result time after time. What can cause this? Any help please?

Hard to say without knowing any details. But an approach would be checking the event logs.

Set the Idle timeOut for an Application Pool to 0 instead of default value of 20 minutes for having no timeout when your service is idle.
using inetmgr
Open IIS Manager. For information about opening IIS Manager, see Open
IIS Manager (IIS 7).
In the Connections pane, expand the server node and click Application
Pools.
On the Application Pools page, select the application pool for
which you want to specify idle time-out settings, and then click
Advanced Settings in the Actions pane.
In the Idle Time-out (minutes) box, type a number of minutes, and then click OK.
uisng cmd
appcmd set config /section:applicationPools /[name=' string
'].processModel.idleTimeout: timeSpan
appcmd set config /section:applicationPools /[name=' Marketing '].processModel.idleTimeout:0.00:30:00

Related

GCP windows VM does not work when logged off

I am running a Windows Server VM on GCP.
When logging in via Remote Desktop, I am starting certain applications which should actively run for a couple of hours.
But when closing my Remote Desktop Connection, all applications stop working.
How can I prevent this from happening?
In order to keep the session ongoing, you'll have to configure the RD Session Host time limits.
Open the group policy editor with: Windows+R, then type gpedit.msc, confirm with Enter.
Then in the management console, navigate to:
Computer Configuration
Administrative Templates
Windows Components
Remote Desktop Services
Remote Desktop Session Host
Session Time Limits
There one can adjust the settings:
Set time limit for disconnected sessions
Terminate session when time limits are reached

AWS - Managing EC2 user sessions

I have an EC2 (Windoes Server R2 2012) that is running a NodeJS process. Now, the detail is that once I get Disconnected from server (Disconnection it is supposed to keep everything on server, hence my NodeJS process) after a few minutes, the session is killed, so also the process.
I connect again and it is like I have signed out. How can I solve this? I really need to the process still running without stay ALWAYS connected to the server.
Normally Windows installation will not logoff disconnected sessions.
Your installation is probably customized for it to be logging off disconnected RDP sessions.
Load the Group Policy Object Editor and go to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Session Time Limits.
Check that the setting "Set time limit for disconnected sessions" is either Not Configured, or Enabled, but with a setting of Never.

IIS hosted application stops when visiting web page

I have an IIS Application Pool Spark.Release configured with a site pointing to a directory on a local C:\ drive. The pool starts automatically but when visiting http://localhost/ the app pool changes to "Stopped" status.
In Event Viewer Windows Logs > Application I see this:
There was an error during processing of the managed application
service auto-start for configuration path:
'MACHINE/WEBROOT/APPHOST/Spark.Release/'. The error message returned
is: ''. The worker process will be marked unhealthy and be shutdown.
The data field contains the error code.
In Windows Logs > System there are 5 occurences of:
A process serving application pool 'Spark.Release' reported a failure
during application preloading or service loading. The process id was
'2344'. Please ensure that all application preload or service
settings in the application pool are configured properly. The data
field contains the error number.
Before this:
Application pool 'Spark.Release' is being automatically disabled due
to a series of failures in the process(es) serving that application
pool.
OS is Windows Server 2016 Datacentre edition.
Where can I begin troubleshooting this? I'm not seeing any logs in my log directory either, literally zero. It's running under the ApplicationPoolIdentity identity.
A required IIS module was not installed 'URL Rewrite' which was being used by the code. There was no indication in any logs that this was the issue.

Web service request times out after app pool recycles

I have a classic web service that is hosted on IIS 7.5 (Windows Server 2008 R2).
After application pool recycles (default 20 minutes idle state), the first request to the web service takes about 5 minutes. When it gets through, every other request to the service takes no time at all.
I read about turning on AlwaysRunning in the IIS 7.5 that is in applicationHost.config. However, I would appreciate if anybody can provide explanation why would it happen and where to search for the cause of the problem.
Thank you in advance.
I avoid a cold start by having a heartbeat execute prior to the app pool recycle interval. However, you still need to let the app pools recycle at some pre-determined interval. See this post on cold starts. Generally, the more dependencies your app consumes and the larger your code base is then the longer it will take to "wake up" on a cold start. The delay is not really noticeable for smaller apps.

CF Service continuously restarts every 25 seconds

After my laptop froze yesterday I rebooted, and now the ColdFusion 9 Application Server service starts and restarts endlessly! Although it's set to start automatically, upon bootup it does not start. So I start it manually. Then I look at the Windows Event Viewer which reports:
The ColdFusion 9 Application Server service for the "coldfusion" server was started. PID is 5788.
That's good. But then, about 9 seconds later, Event Viewer reports:
The ColdFusion 9 Application Server service for the "coldfusion" server is restarting.
16 seconds later, the Event Viewer reports that the service has, in fact, started again. And 9 seconds after that, it reports that the service is starting again.
Unless I manually stop the service, this cycle continues, with the CF service restarting itself every 25 seconds, give or take a second. Needless to say, I can't use ColdFusion. When I try to reach a page, I get error 500: There is no web application configured to service your request
I am running the developer edition of CF9, Windows. Computer behaves normally otherwise.
[Edit]
The coldfusion-out.log includes this:
Server coldfusion ready (startup time: 9 seconds)
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_IN_PAGE_ERROR (0xc0000006) at pc=0x6d6e2424, pid=5456, tid=7724
JRE version: 6.0_17-b04
Java VM: Java HotSpot(TM) Server VM (14.3-b01 mixed mode windows-x86 )
Problematic frame:
C [nio.dll+0x2424]
An error report file with more information is saved as:
C:\ColdFusion9\runtime\bin\hs_err_pid5456.log
If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
The detailed error report, C:\ColdFusion9\runtime\bin\hs_err_pid5456.log, has a ton of information, but I don’t understand much of it. I’ll be happy to post it all if you think you might be able to make heads or tails of it.
In the event that the only solution is to reinstall CF, can you tell me where to find the config files? I know I will need jrun-web.xml (and I know where it is), but where, for example, are the datasource definitions found? I can’t seem to find any folder or file with the settings from the CF Admin. (The CF Admin won’t run, so I can’t view them that way.)