Pkg: [Q] how to set memory size option

Created on 15 Jun 2018  路  3Comments  路  Source: vercel/pkg

node --max_old_space_size=4096 myAwesomeServer.js

How can I add (max_old_space_size) options to the pkg compression binary?

cf. environment setting also not working
export NODE_OPTIONS="--max-old-space-size=2048"
./pkged_binary
Pkg: FLAGS_MISMATCH

Most helpful comment

For anyone that happens upon this issue, it's in the documentation here:
https://github.com/zeit/pkg#options

How would you do this for multiple options?
Would it be like this pkg app.js --options expose-gc max_old_space_size=4096?

All 3 comments

For anyone that happens upon this issue, it's in the documentation here:
https://github.com/zeit/pkg#options

How would you do this for multiple options?
Would it be like this pkg app.js --options expose-gc max_old_space_size=4096?

Can you confirm then that this is not possible to change at runtime?

That NODE_OPTIONS or any other way will not work, for example, if I don't want to bake 'max_old_space_size' into the binary, I want to change without needing to re-package.

Thanks

Any one can confirm that?
I could be great to increase max size limit at runtime and not at the build moment.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ydubois-fr picture ydubois-fr  路  4Comments

Admiral-Enigma picture Admiral-Enigma  路  3Comments

jflayhart picture jflayhart  路  4Comments

ndrantotiana picture ndrantotiana  路  4Comments

j-brown picture j-brown  路  4Comments