Node.js v8-options

29 views
Skip to first unread message

Michael A. Jackson

unread,
Aug 25, 2016, 2:08:40 PM8/25/16
to Phusion Passenger Discussions
I'm trying to add v8-options when a Node.js app is started.

I created a script and put it on the path, but I get the following error:
/opt/testApp/bin/node: line 9:  6575 Illegal instruction     (core dumped) /usr/bin/node --abort_on_uncaught_exception "$@"

This script works when I use it directly, but not when used by passenger.
Is this method the correct way to add options, if not, what is the alternative. If yes, where are these " encoding coming from and how do I address it?

Michael A. Jackson

unread,
Aug 25, 2016, 7:13:57 PM8/25/16
to Phusion Passenger Discussions
Ok, the $quot; was an html formatted version of the error, that was not an issue

Using exec solved the issue of passing a variable, but now the startup just hangs.  

Still trying to solve this...

Camden Narzt

unread,
Aug 26, 2016, 9:55:46 AM8/26/16
to Phusion Passenger Discussions
Can you provide a startup log, with logging set to level 7?

Thanks

Cam

Michael A. Jackson

unread,
Aug 26, 2016, 12:37:36 PM8/26/16
to Phusion Passenger Discussions
Ok, I have it working.   I was testing against a bad build, so that clouded the issue.  The root of the problem was that I was not using exec.

Here is the node executable wrapper that I'm using, which is working:

#!/usr/bin/env bash

#Set 2gb core dump limit
ulimit -c 4194304

# v8-options:
#   --abort_on_uncaught_exception
#     (abort program (dump core) when an uncaught exception is thrown)
exec /usr/bin/node --abort_on_uncaught_exception "$@"
Reply all
Reply to author
Forward
0 new messages