maciejmaciejewski / azure-pipelines-postman

MIT License
12 stars 9 forks source link

Error in pipeline "Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory" #20

Open gauravlakhani opened 1 year ago

gauravlakhani commented 1 year ago

We are using this task in our pipelines to display the html report but we are facing an issue "heap out of memory" in one pipeline. Its showing error as following:

2022-09-19T05:58:29.3833856Z FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 2022-09-19T05:58:29.5394171Z 1: 00007FF69DDA89AA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506 2022-09-19T05:58:29.5397362Z 2: 00007FF69DD834E6 node::MakeCallback+4534 2022-09-19T05:58:29.5398249Z 3: 00007FF69DD83E60 node_module_register+2032 2022-09-19T05:58:29.5401112Z 4: 00007FF69E0A2F4E v8::internal::FatalProcessOutOfMemory+846 2022-09-19T05:58:29.5402369Z 5: 00007FF69E0A2E7F v8::internal::FatalProcessOutOfMemory+639 2022-09-19T05:58:29.5403314Z 6: 00007FF69E289674 v8::internal::Heap::MaxHeapGrowingFactor+9620 2022-09-19T05:58:29.5404175Z 7: 00007FF69E280656 v8::internal::ScavengeJob::operator=+24550 2022-09-19T05:58:29.5405299Z 8: 00007FF69E27ECAC v8::internal::ScavengeJob::operator=+17980 2022-09-19T05:58:29.5406051Z 9: 00007FF69E2879F7 v8::internal::Heap::MaxHeapGrowingFactor+2327 2022-09-19T05:58:29.5406729Z 10: 00007FF69E287A76 v8::internal::Heap::MaxHeapGrowingFactor+2454 2022-09-19T05:58:29.5407486Z 11: 00007FF69E3B1D17 v8::internal::Factory::NewFillerObject+55 2022-09-19T05:58:29.5408033Z 12: 00007FF69E42EF06 v8::internal::operator<<+73494 2022-09-19T05:58:29.5408517Z 13: 000000B315B5C6C1 2022-09-19T05:58:30.0625799Z ##[error]Exit code 134 returned from process: file name 'E:\Queue1\externals\node10\bin\node.exe', arguments '"E:\Queue1_work_tasks\UploadPostmanHtmlReport_f5384bf0-1b5c-11ea-b0cc-5b064956a213\1.1.3\index.js"'. 2022-09-19T05:58:30.0641091Z ##[section]Finishing: Upload Postman Html Report

Can you please help fix this issue? Many thanks in advance.

schurlinga commented 6 months ago

Setting the env variable "NODE_OPTIONS" solves this problem:

- task: UploadPostmanHtmlReport@1
  displayName: 'Upload Postman HTML Report'
  inputs:
    cwd: '$(System.DefaultWorkingDirectory)/newman'
    tabName: 'ZBA Api Postman Test'
  env:
    NODE_OPTIONS: --max_old_space_size=16384