jhawthorn / execjs-fastnode

:zap: A faster Node.JS integration for Ruby/Rails ExecJS
MIT License
51 stars 2 forks source link

socket connection refused #9

Closed xjustin13 closed 1 year ago

xjustin13 commented 2 years ago

I get ActionView::Template::Error (Connection refused - "/tmp/execjs-fastnode-20221108-1531-1rvfa3b/socket"): in Rails production log after about 30 hits to the site. I'm using this gem not just to compile assets during deployment, but actually calling a JavaScript function repeatedly on the fly. I do like CONTEXT = ExecJS.compile(source) once at boot, and then repeatedly do CONTEXT.call('someFunction', some_arg) whenever someone hits the site. I'm using Ruby 2.0.0-p648, Rails 3.2.22, Phusion Passenger 4.0.60, on FreeBSD 11.4 with Node 16.6.2. I get no issues in development mode on Debian 9 with Node 14.20.1, nor do I get any issues with just the execjs gem.

erikt9 commented 1 year ago

Your node process is probably dying for some reason. Check if it is still running after the error occurs.