I can´t deploy an angular app to my app service on azure because of FATAL ERROR Ineffective mark-compacts near heap limit Allocation failed

Bernardo Garza García 10 Reputation points
2023-08-13T21:53:11.42+00:00

Hi everyone,

I´ve been trying to deploy my angular application to azure web service (web app service).

Steps:

  1. Use a build pipeline to generate an artifact (zip file) in Azure DevOps
  2. Use a release pipeline that uses the previous generated artifact to deploy to my app service
  3. An error occurs

Notes:

  1. The zip file has a total size of 150MB
  2. I have used 2 different tasks without any success (AzureWebApp@1 and AzureRmWebAppDeployment@4)

Can someone help me please ? Don't know if I'm doing something wrong or if there´s a known issue related to release pipelines

STACKTRACE

2023-08-13T05:07:14.5302848Z FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

2023-08-13T05:07:14.7863924Z  1: 00007FF6FEF489AA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506

2023-08-13T05:07:14.7866373Z  2: 00007FF6FEF234E6 node::MakeCallback+4534

2023-08-13T05:07:14.7869155Z  3: 00007FF6FEF23E60 node_module_register+2032

2023-08-13T05:07:14.7871100Z  4: 00007FF6FF242F4E v8::internal::FatalProcessOutOfMemory+846

2023-08-13T05:07:14.7872124Z  5: 00007FF6FF242E7F v8::internal::FatalProcessOutOfMemory+639

2023-08-13T05:07:14.7873097Z  6: 00007FF6FF429674 v8::internal::Heap::MaxHeapGrowingFactor+9620

2023-08-13T05:07:14.7874238Z  7: 00007FF6FF420656 v8::internal::ScavengeJob::operator=+24550

2023-08-13T05:07:14.7875507Z  8: 00007FF6FF41ECAC v8::internal::ScavengeJob::operator=+17980

2023-08-13T05:07:14.7876896Z  9: 00007FF6FF4279F7 v8::internal::Heap::MaxHeapGrowingFactor+2327

2023-08-13T05:07:14.7878550Z 10: 00007FF6FF427A76 v8::internal::Heap::MaxHeapGrowingFactor+2454

2023-08-13T05:07:14.7879539Z 11: 00007FF6FF551D17 v8::internal::Factory::NewFillerObject+55

2023-08-13T05:07:14.7881203Z 12: 00007FF6FF5CEF06 v8::internal::operator<<+73494

2023-08-13T05:07:14.7881902Z 13: 000000B013FDC6C1 

2023-08-13T05:07:15.2310298Z ##[error]Exit code 134 returned from process: file name 'C:\externals\node10\bin

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,931 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2023-08-16T18:12:59.98+00:00

    Hi @Bernardo Garza García

    I can't imagine the zip file size being a contributing factor. I would try deploying the code directly to the app service via zip deploy, which you can do inside Visual Studio Code, or local git. This will help narrow down if it's your DevOps pipeline or your code repo.

    The error message itself is pointing to memory allocation errors. I would caution to say you may hit the same issue using a different deployment method. Something else you could try is adjusting the memory limit via WEBSITE_MEMORY_LIMIT_MB application setting, changing the Node.js runtime, or upgrading to the latest Node.js version. If you're seeing positive results with that, then you can scale up your app service plan. You can also try to scale it back it down or create a separate app service plan just to see if you're getting the same deployment error.

    If none of that is helpful, then we would need to work more closely with you regarding the matter. Please feel free to comment down below to let us know the outcome.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.