-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure App Service Deploy failed - JavaScript heap out of memory #4734
Comments
@gongdo , Can you please share the debug logs? (by enabling |
@vincentdass Ok, here it is.
Still, I'm not sure what is the problem in this settings. |
I found that this error occurs when the deployment package(.zip) is too large, about 500MB. |
@gongdo , can you please provide us details on how the package (zip) is generated? (generated from MSBuild / Gulp / Grunt or others). |
@gongdo , are you able to deploy the package ? Can you please provide the details for the questions asked above to invesitgate ? |
@gongdo, waiting for the package details to debug further. |
Same error for me. Using Gulp. |
Thanks for reporting this @cybage-sumedh . Can you share the debug logs ? |
@cybage-sumedh We were looking for debug logs. To get the debug logs add the variable system.debug and set its value to true. Queue the build again. |
Sure... i will do the same and will post soon |
Please send the logs to RM_Customer_Queries at microsoft dot com since this is a public forum. |
@vincentdass @asranja I made fake app that reproduce the problem. [added] As you can see, there's almost nothing. And I setup VSTS Build like this:
I'm not sure what exactly makes the I solved this problem to deploy only minified js from the build. But I think many node developers prefer to deploy git repository as it is. |
@gongdo , thanks for the repro steps, really appreciated. Please follow any of the workaround provided below to unblock yourself:
|
@vincentdass Your solution is working, but that's what exactly what I wanted to avoid. I'm not sure what deploying method would be the best for a Node app on the Azure App Services, but it's definitely out of this topic. It would be a case-by-case solution as always :) Anyway I'm happy you've found the root cause of the problem. |
@vincentdass are you still working on an solution, because i have exactly the same issue with the deployment? |
@AlexanderParadeis , sorry the issue is not fixed yet. |
Thanks for the fast reply, i will try the steps as a workaround. |
I'm getting this error while building an angular app... ... |
Anyone found solution for this. We are using hybrid angular/angular JS application and our build is stuck an ran for 60 minutes and time out. After made changes in build script by using --max_old_space setting as recommended here angular/angular-cli#5618. |
It's not fixed. Those of us with large enterprise apps cannot fix this with max_old_space. |
Thanks @nickraphael for your reply. It is working fine with --max_old_space on my local PC, but the build on vsts failed. |
I'm also experiencing the same issues here. Build keeps getting stuck when I use max_old_space. |
@Pumba-Coder , Please share the task version that you are currently using. |
Working with a hosted vs2017 deployment using version 4.3.33 as seen below: ============================================================================== agent version is C:\agents\2.153.2\externals\node\bin\node.exe. |
@vincentdass I have changed over to use that task and it will run through fine, but it wont start my server. |
@Pumba-Coder , Can you please share the debug logs (set variuable |
@vincentdass I've attached the run agent log file. web app deploy: |
@vincentdass - Any update on this issue as even I am noticing the same error as @Pumba-Coder after enabling "Generate web.config" and using new "Azure Web App" task. |
@nitinmb , looking into this issue. Will update once there is anytrack found. |
@vincentdass - Do you have any updates on this ? |
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory <--- Last few GCs ---> 58445 ms: Mark-sweep 1372.8 (1435.0) -> 1372.7 (1435.0) MB, 1090.0 / 0.0 ms [allocation failure] [GC in old space requested]. <--- JS stacktrace ---> ==== JS stack trace ========================================= Security context: 0x24d893bcfb39 2: 0x109b9cc [/workspaces/externals/node/bin/node] |
This is not an issue with Azure pipeline per say, as you can override this behavior to run your build with more memory and still get it to succeed. An updated version on how to do this isto use the npm package CrossEnv and to set it up this way in your package.json in order to run:
Then you just run your script from properly configuring your Azure pipeline task to do so and you are good to go. |
ths!
i have resloved the problem by add the
scripts yarn upgrade gulp
发自我的iPhone
…------------------ Original ------------------
From: Benjamin Soulier <notifications@github.com>
Date: Tue,Sep 24,2019 11:37 PM
To: microsoft/azure-pipelines-tasks <azure-pipelines-tasks@noreply.github.com>
Cc: zhangwk02 <415675018@qq.com>, Comment <comment@noreply.github.com>
Subject: Re: [microsoft/azure-pipelines-tasks] Azure App Service Deploy failed - JavaScript heap out of memory (#4734)
This is not an issue with Azure pipeline per say, as you can override this behavior to run your build with more memory and still get it to succeed.
An updated version on how to do this isto use the npm package CrossEnv and to set it up this way in your package.json in order to run:
"scripts": { "build:prod:aot": "cross-env NODE_OPTIONS=--max_old_space_size=8000 ng build --prod --optimization --build-optimizer --aot --progress" }
Then you just run your script from properly configuring your Azure pipeline task to do so and you are good to go.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I am facing same issue.I tried to fix using it worked for few times and again I am facing same issue.
|
I am facing same issue. |
Solution for Azure Pipeline in Azure DevOps:
Set the Environment Variable |
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
I'm trying to deploy my NodeJS app using
Azure App Service Deploy
in theRelease
feature.I'm currently using VSTS default
Hosted VS2017
as an agent.Here's log:
I don't think that my app causes this failure, since the build process was succeeded without any error.
The text was updated successfully, but these errors were encountered: