Skip to content

Commit

Permalink
Merge pull request #493 from Azure/master
Browse files Browse the repository at this point in the history
Update to v0.2.21
  • Loading branch information
rramachand21 committed Apr 11, 2016
2 parents 95b5abb + 7db349e commit bd95f42
Show file tree
Hide file tree
Showing 1,894 changed files with 199,281 additions and 13,519 deletions.
18 changes: 18 additions & 0 deletions src/iisnode/cmoduleconfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,26 @@ HRESULT CModuleConfiguration::CreateNodeEnvironment(IHttpContext* ctx, DWORD deb
sprintf(tmpIndex, "IISNODE_VERSION=%s", IISNODE_VERSION);
tmpIndex += strlen(IISNODE_VERSION) + 17;

//
// set NODE_PIPE_PENDING_INSTANCES because node.exe defaults to 4 concurrent requests
// and we get E_PIPEBUSY errors. Increasing this value to 50 to prevent E_PIPEBUSY.
//
WCHAR pszPendingPipeInstances[256];
DWORD dwPendingPipeInstancesLen = 256;
dwPendingPipeInstancesLen = GetEnvironmentVariableW( L"NODE_PENDING_PIPE_INSTANCES",
pszPendingPipeInstances,
dwPendingPipeInstancesLen);

if(dwPendingPipeInstancesLen <= 0)
{
ErrorIf((tmpSize - (tmpStart - tmpIndex) < 33), ERROR_NOT_ENOUGH_MEMORY);
sprintf(tmpIndex, "NODE_PENDING_PIPE_INSTANCES=5000");
tmpIndex += 33;
}

if(CModuleConfiguration::GetRecycleSignalEnabled(ctx) && signalPipeName != NULL)
{
ErrorIf((tmpSize - (tmpStart - tmpIndex) < (strlen(signalPipeName) + 22)), ERROR_NOT_ENOUGH_MEMORY);
sprintf(tmpIndex, "IISNODE_CONTROL_PIPE=%s", signalPipeName);
tmpIndex += strlen(signalPipeName) + 22;
}
Expand Down
21 changes: 8 additions & 13 deletions src/iisnode/cprotocolbridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -775,11 +775,6 @@ void CProtocolBridge::SendHttpRequestHeaders(CNodeHttpStoredContext* context)
hr = GetLastError();
if (ERROR_IO_PENDING == hr)
{
// will complete asynchronously

etw->Log(context->GetHttpContext(), L"iisnode initiated sending http request headers to the node.exe process and will complete asynchronously",
WINEVENT_LEVEL_VERBOSE,
&activityId);
}
else
{
Expand Down Expand Up @@ -901,8 +896,8 @@ void CProtocolBridge::ReadRequestBody(CNodeHttpStoredContext* context)
}
else
{
context->GetNodeApplication()->GetApplicationManager()->GetEventProvider()->Log(context->GetHttpContext(),
L"iisnode initiated reading http request body chunk and will complete asynchronously", WINEVENT_LEVEL_VERBOSE, context->GetActivityId());
//context->GetNodeApplication()->GetApplicationManager()->GetEventProvider()->Log(context->GetHttpContext(),
// L"iisnode initiated reading http request body chunk and will complete asynchronously", WINEVENT_LEVEL_VERBOSE, context->GetActivityId());
}

return;
Expand Down Expand Up @@ -1086,9 +1081,9 @@ void CProtocolBridge::SendRequestBody(CNodeHttpStoredContext* context, DWORD chu
{
// will complete asynchronously

etw->Log(context->GetHttpContext(), L"iisnode initiated sending http request body chunk to the node.exe process and will complete asynchronously",
WINEVENT_LEVEL_VERBOSE,
&activityId);
//etw->Log(context->GetHttpContext(), L"iisnode initiated sending http request body chunk to the node.exe process and will complete asynchronously",
// WINEVENT_LEVEL_VERBOSE,
// &activityId);
}
else if (ERROR_NO_DATA == hr)
{
Expand Down Expand Up @@ -1264,9 +1259,9 @@ void CProtocolBridge::ContinueReadResponse(CNodeHttpStoredContext* context)
{
// read will complete asynchronously

etw->Log(context->GetHttpContext(), L"iisnode initiated reading http response chunk and will complete asynchronously",
WINEVENT_LEVEL_VERBOSE,
&activityId);
//etw->Log(context->GetHttpContext(), L"iisnode initiated reading http response chunk and will complete asynchronously",
// WINEVENT_LEVEL_VERBOSE,
// &activityId);
}
else if (ERROR_BROKEN_PIPE == hr && context->GetCloseConnection())
{
Expand Down
Loading

0 comments on commit bd95f42

Please sign in to comment.