Skip to content
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

JavaScript heap out of memory #1516

Closed
floppyrom opened this issue Apr 30, 2018 · 9 comments
Closed

JavaScript heap out of memory #1516

floppyrom opened this issue Apr 30, 2018 · 9 comments
Assignees

Comments

@floppyrom
Copy link

Hi

I get this error when running my Postman tests on Jenkins with Newman 3.9.3

Security context: 0x2a7f428cf781
1: SparseJoinWithSeparatorJS(aka SparseJoinWithSeparatorJS) [native array.js:~75] [pc=0x1f862cee9cc5] (this=0x2a7f42804381 ,w=0x264fcb504739 <JS Array[8896703]>,F=0x1eb5b5f73599 <JS Array[8896703]>,x=8896703,I=0x2a7f428b7931 <JS Function ConvertToString (SharedFunctionInfo 0x2a7f428526e1)>,J=0x264fcb504201 <String[16]: ,\n >)
2: DoJoin(aka DoJoin) [native array....

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0xdf1e8c [node]
3: v8::Utils::ReportApiFailure(char const*, char const*) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [node]
6: v8::internal::Runtime_SparseJoinWithSeparator(int, v8::internal::Object**, v8::internal::Isolate*) [node]
7: 0x1f862bd092a7

@kunagpal
Copy link
Contributor

@floppyrom Could you share how exactly Newman is being used? (CLI/script)

@kunagpal kunagpal self-assigned this Apr 30, 2018
@floppyrom
Copy link
Author

Hi

I have a job which is executing tests on a docker container which holds a Wildfly 10.

I have some tests that check GETs, PUT and POST calls. A few of these GETs retrieve >20K records in JSON format.

This is how I call the newman from Jenkins

newman run test_collection.postman_collection.json --timeout-script 300000 --environment DEV.postman_environment.json --insecure --disable-unicode --reporters json,cli,junit --suppress-exit-code

@kunagpal
Copy link
Contributor

Could you try the following command and let me know how it goes?

NODE_OPTIONS="--max-old-space-size=2048" newman run test_collection.postman_collection.json --timeout-script 300000 --environment DEV.postman_environment.json --insecure --disable-unicode --reporters json,cli,junit --suppress-exit-code

Note that the value of --max-old-space-size above is in megabytes, you may have to increase this value to get things working again.

@floppyrom
Copy link
Author

Hm. The build fails with this now

  • NODE_OPTIONS=--max-old-space-size=2048
  • newman run test_collection.postman_collection.json --timeout-script 300000 --environment DEV.postman_environment.json --insecure --disable-unicode --reporters json,cli,junit --suppress-exit-code
    node: --max-old-space-size=2048 is not allowed in NODE_OPTIONS

@kunagpal
Copy link
Contributor

@floppyrom Which version of Node are you using?

@floppyrom
Copy link
Author

I have node v6.12.0

@kunagpal
Copy link
Contributor

kunagpal commented Apr 30, 2018

Could you retry this with: --max_old_space_size=2048? (underscore separators instead of hyphens)

v6.12.0 has a bug that was fixed in nodejs/node#14093. Versions of Node beyond this one should accept both forms.

@floppyrom
Copy link
Author

Awesome. I will update and let you know on wednesday. Thanks for the help so far :D

@kunagpal
Copy link
Contributor

kunagpal commented May 1, 2018

@floppyrom Marking this issue as closed, feel free to revert if you're having difficulties 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants