Skip to content

Commit

Permalink
Increase node pending pipe instances
Browse files Browse the repository at this point in the history
  • Loading branch information
rramachand21-zz committed Sep 10, 2015
1 parent 32588b8 commit 509e413
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/iisnode/cmoduleconfiguration.cpp
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) < 31), ERROR_NOT_ENOUGH_MEMORY);
sprintf(tmpIndex, "NODE_PENDING_PIPE_INSTANCES=50");
tmpIndex += 31;
}

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
2 changes: 1 addition & 1 deletion src/version.txt
@@ -1 +1 @@
0.2.19
0.2.20

0 comments on commit 509e413

Please sign in to comment.