Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64368

JavaScript heap out of memory occured during the gulp task

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Not A Defect
    • Component/s: nodejs-plugin
    • Labels:
      None
    • Environment:
      Windows
    • Similar Issues:

      Description

      FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

      the above error occurred during the gulp task. please help in this.
      Node V. 6.11.1

        Attachments

        1. Capture.PNG
          Capture.PNG
          24 kB
        2. screenshot-1.png
          screenshot-1.png
          32 kB
        3. screenshot-2.png
          screenshot-2.png
          47 kB

          Activity

          Hide
          nfalco Nikolas Falco added a comment - - edited

          Sorry but I do not really understand how this issue is related with the nodeJS plugin. What the NodeJS plugin does is provide a specific configured version of NodeJS on the node and support credentials in case of publish artifact on a npm registry.

          What happens with the run of npm or node commands depends on you/your system/scripts .....

          Show
          nfalco Nikolas Falco added a comment - - edited Sorry but I do not really understand how this issue is related with the nodeJS plugin. What the NodeJS plugin does is provide a specific configured version of NodeJS on the node and support credentials in case of publish artifact on a npm registry. What happens with the run of npm or node commands depends on you/your system/scripts .....
          Hide
          thiru_rajamoorthy Thirumoorthy added a comment - - edited

          It works when I tried it manually and also it works in visual studio publish. and during the gulp the NodeJS utilizing the memory upto 1300mb.
          But when the Jenkins doing the gulp the nodejs's memory utilization is not beyond 830mb of memory.

          Based on the research we did in Google we should increase the NodeJS's memory up to 4gb.

          With the below commend we can able to reduce and increase the NodeJS memory. But when we try it in the Jenkins pipeline it throws an error message.

          comment "gulp taskname --max-old-space-size=8192"

          All the nodejs version is 6.11.1 on which my application compatible with.

          Kindly help on this and let me know if more info required

          Show
          thiru_rajamoorthy Thirumoorthy added a comment - - edited It works when I tried it manually and also it works in visual studio publish. and during the gulp the NodeJS utilizing the memory upto 1300mb. But when the Jenkins doing the gulp the nodejs's memory utilization is not beyond 830mb of memory. Based on the research we did in Google we should increase the NodeJS's memory up to 4gb. With the below commend we can able to reduce and increase the NodeJS memory. But when we try it in the Jenkins pipeline it throws an error message. comment "gulp taskname --max-old-space-size=8192" All the nodejs version is 6.11.1 on which my application compatible with. Kindly help on this and let me know if more info required
          Hide
          nfalco Nikolas Falco added a comment -

          Again, the plugin simply download the archive of the NodeJS version and download into the tool folder after that add to the PATH its bin folder. Nothing more. You can replicate the same issue performing a sh step that download the tar.gz, unzip and than set the PATH=$PATH:${WORKSPACE}/NodeJS..../bin

          Show
          nfalco Nikolas Falco added a comment - Again, the plugin simply download the archive of the NodeJS version and download into the tool folder after that add to the PATH its bin folder. Nothing more. You can replicate the same issue performing a sh step that download the tar.gz, unzip and than set the PATH=$PATH:${WORKSPACE}/NodeJS..../bin
          Hide
          nfalco Nikolas Falco added a comment - - edited

          Job configuration, pipeline code you are running and the whole console log could help much more.

          Moreover add

           

          node -v
          npm -v
          echo %PATH%"
          

          commands just to check what you have in the path

          Show
          nfalco Nikolas Falco added a comment - - edited Job configuration, pipeline code you are running and the whole console log could help much more. Moreover add   node -v npm -v echo %PATH%" commands just to check what you have in the path
          Hide
          thiru_rajamoorthy Thirumoorthy added a comment -

          Hello Nikolas,
          Thanks for explaining the behavior of the Plugin.

          Please find details below.
          Node version: 6.11.1
          npm version: 3.10.10
          cache location: Default

          Please fine log below:

          Please let me know if any detail required

          Show
          thiru_rajamoorthy Thirumoorthy added a comment - Hello Nikolas, Thanks for explaining the behavior of the Plugin. Please find details below. Node version: 6.11.1 npm version: 3.10.10 cache location: Default Please fine log below: Please let me know if any detail required

            People

            Assignee:
            nfalco Nikolas Falco
            Reporter:
            thiru_rajamoorthy Thirumoorthy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: