Skip to content

Commit bd18884

Browse files
committed
Make startup time recycle worker process
1 parent 6a3ce0d commit bd18884

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/Servers/IIS/AspNetCoreModuleV2/InProcessRequestHandler/InProcessOptions.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ class InProcessOptions: NonCopyable
7575
DWORD
7676
QueryStartupTimeLimitInMS() const
7777
{
78-
if (IsDebuggerPresent())
79-
{
80-
return INFINITE;
81-
}
78+
//if (IsDebuggerPresent())
79+
//{
80+
// return INFINITE;
81+
//}
8282

8383
return m_dwStartupTimeLimitInMS;
8484
}

src/Servers/IIS/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ IN_PROCESS_APPLICATION::LoadManagedApplication(ErrorContext& errorContext)
169169
errorContext.errorReason = format("ASP.NET Core app failed to start after %d milliseconds", m_pConfig->QueryStartupTimeLimitInMS());
170170

171171
m_waitForShutdown = false;
172-
StopClr();
172+
Stop(/* fServerInitiated */false);
173173
throw InvalidOperationException(format(L"Managed server didn't initialize after %u ms.", m_pConfig->QueryStartupTimeLimitInMS()));
174174
}
175175

src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ public async Task RemoveInProcessReference_FailedToFindRequestHandler()
455455
[ConditionalFact]
456456
public async Task StartupTimeoutIsApplied()
457457
{
458-
// From what I can tell, this failure is due to ungraceful shutdown.
458+
// From what we can tell, this failure is due to ungraceful shutdown.
459459
// The error could be the same as https://github.com/dotnet/core-setup/issues/4646
460460
// But can't be certain without another repro.
461461
using (AppVerifier.Disable(DeployerSelector.ServerType, 0x300))
@@ -470,11 +470,12 @@ public async Task StartupTimeoutIsApplied()
470470
var response = await deploymentResult.HttpClient.GetAsync("/");
471471
Assert.Equal(HttpStatusCode.InternalServerError, response.StatusCode);
472472

473-
StopServer(gracefulShutdown: false);
473+
deploymentResult.AssertWorkerProcessStop();
474+
//StopServer(gracefulShutdown: false);
474475

475-
EventLogHelpers.VerifyEventLogEvents(deploymentResult,
476-
EventLogHelpers.InProcessFailedToStart(deploymentResult, "Managed server didn't initialize after 1000 ms.")
477-
);
476+
EventLogHelpers.VerifyEventLogEvent(deploymentResult,
477+
EventLogHelpers.InProcessFailedToStart(deploymentResult, "Managed server didn't initialize after 1000 ms."),
478+
Logger);
478479

479480
if (DeployerSelector.HasNewHandler)
480481
{

0 commit comments

Comments
 (0)