iisnode icon indicating copy to clipboard operation
iisnode copied to clipboard

Node Inspector SLOW to load and eventually fails..

Open jamesdixon opened this issue 9 years ago • 7 comments

Hi,

I'm using iisnode via an Azure Website. When I attempt to load the inspector, it takes absolutely forever to load each of the files, with some of the inspector's files returning a 502 error. After 5+ minutes it will eventually complete, but the inspector is broken due to some files failing to be retrieved. You can see for yourself here: http://scout-api-staging.azurewebsites.net/server.js/debug

Here's a sample readout from Chrome Dev Tools:

image

I've enabled Websockets in the Azure portal according to the instructions. I'm using the default web.config generated by Kudu and have enabled debugging via iisnode.yml. Here are those files for reference:

<?xml version="1.0" encoding="utf-8"?>
<!--
     This configuration file is required if iisnode is used to run node processes behind
     IIS or IIS Express.  For more information, visit:

     https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config
-->

<configuration>
  <system.webServer>
    <!-- Visit http://blogs.msdn.com/b/windowsazure/archive/2013/11/14/introduction-to-websockets-on-windows-azure-web-sites.aspx for more information on WebSocket support -->
    <webSocket enabled="false" />
    <handlers>
      <!-- Indicates that the server.js file is a node.js site to be handled by the iisnode module -->
      <add name="iisnode" path="server.js" verb="*" modules="iisnode"/>
    </handlers>
    <rewrite>
      <rules>
        <!-- Do not interfere with requests for node-inspector debugging -->
        <rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
          <match url="^server.js\/debug[\/]?" />
        </rule>

        <!-- First we consider whether the incoming URL matches a physical file in the /public folder -->
        <rule name="StaticContent">
          <action type="Rewrite" url="public{REQUEST_URI}"/>
        </rule>

        <!-- All other URLs are mapped to the node.js site entry point -->
        <rule name="DynamicContent">
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
          </conditions>
          <action type="Rewrite" url="server.js"/>
        </rule>
      </rules>
    </rewrite>

    <!-- 'bin' directory has no special meaning in node.js and apps can be placed in it -->
    <security>
      <requestFiltering>
        <hiddenSegments>
          <remove segment="bin"/>
        </hiddenSegments>
      </requestFiltering>
    </security>

    <!-- Make sure error responses are left untouched -->
    <httpErrors existingResponse="PassThrough" />

    <!--
      You can control how Node is hosted within IIS using the following options:
        * watchedFiles: semi-colon separated list of files that will be watched for changes to restart the server
        * node_env: will be propagated to node as NODE_ENV environment variable
        * debuggingEnabled - controls whether the built-in debugger is enabled

      See https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config for a full list of options
    -->
    <!--<iisnode watchedFiles="web.config;*.js"/>-->
  </system.webServer>
</configuration>
debuggingEnabled: true
loggingEnabled: true
devErrorsEnabled: true
nodeProcessCommandLine: "D:\Program Files (x86)\nodejs\4.2.3\node.exe" --use_strict

Thank you in advance!

James

jamesdixon avatar Jan 21 '16 02:01 jamesdixon

For now, could you please adding another setting debuggingExtensionDll="iisnode-inspector.dll" - This will force iisnode to use the old node inspector which does not require websockets.

rramachand21-zz avatar Apr 07 '16 19:04 rramachand21-zz

Server crashes when doing this. Also, the files that are loading aren't even loaded over websockets -- it's all JS assets for the inspector.

jamesdixon avatar Sep 20 '16 06:09 jamesdixon

also having same issue, i get as far as the title loading then dies image

Ahriana avatar Dec 06 '17 21:12 Ahriana

I am also having this issue. Has anyone found a fix for it at this point?

MichaelKB1977 avatar Apr 12 '18 19:04 MichaelKB1977

Same issue here - unable (extremly slow - eventually failing) to load debugger on azure web app

olee avatar May 07 '18 11:05 olee

Same problem here - 500s on various JS assets associated with debugging... And it's crazy slow as well... Annoyingly enough, you can "open in a new tab" on the failed assets and they will normally load just fine. If you refresh, the assets that fail will often vary...

Personally, I'm really regretting spending the last 2 weeks developing this API in node as it seems that IISNode is busted in many cases and largely abandoned. Don't really get how MS reconciles continuing to push NodeJS as viable for Enterprise development when the backbone of Node support in Windows is IISNode (the Azure maintained repo isn't much better).

mattezell avatar Sep 20 '18 19:09 mattezell

Any updates on this folks?

fierro avatar Jan 29 '19 04:01 fierro