qq99 / echoplexus

Socket.io powered chat, JavaScript REPL, whiteboard, and WebRTC calls
Other
394 stars 53 forks source link

Use phridge for phantomjs integration #236

Closed alx closed 9 years ago

alx commented 10 years ago

I've had issues with phantomjs processes that were not killed after being used, this bridge etween node and phantomjs might help to mitigate this issue :

https://github.com/peerigon/phridge

qq99 commented 10 years ago

I've seen this too, and needed to do pkill phantomjs every once in a while I'll see what I can do to fix this up a bit

qq99 commented 10 years ago

Interestingly, this says that you can put a timeout on the process http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options

We have a 30*1000 ms timeout in place (https://github.com/qq99/echoplexus/blob/master/src/server/ChatServer.coffee#L278), already, and yet somehow it stays around! Default is apparently SIGTERM, and pkill also sends SIGTERM by default. Latter works, former does not

qq99 commented 10 years ago

Annnd it seems the reason why might be the node version. Which are you using @alx ? node v0.10.9 doesn't seem to support timeout in the options for spawn. I'll look into mentioning the recommended version of node in the docs/INSTALL.md

http://nodejs.org/docs/v0.10.9/api/child_process.html#child_process_child_process_spawn_command_args_options

alx commented 10 years ago

Hi qq99,

thanks for your reply concerning this issue.

The box running chat.tetalab.org is using node v0.10.10

Have a nice day,

Alex

qq99 commented 9 years ago

Seems 0.10.10 also doesn't have timeout as an option for spawn, I think the latest node may be stable, so I might try deploying that sometime soon

alx commented 9 years ago

Thanks, I'll update to v0.10.29 tomorrow and let you know if the timeout feature is working fine.

qq99 commented 9 years ago

Closing for now unless it continues to be a problem