brenden / node-webshot

Easy website screenshots in Node.js
2.12k stars 286 forks source link

Process doesn't exit when both timeout and takeShotOnCallback specified #113

Open ismyrnow opened 9 years ago

ismyrnow commented 9 years ago

When setting takeShotOnCallback option to true, and timeout to a positive value, the process may continue running after an error is returned in the callback.

My use case is that if the server is unavailable, I want to exit with an error after a period of time. It seems that an error is properly returned in the callback, but the child process doesn't exit.

I am currently working around this by setting errorIfStatusIsNot200 to true, but I'm not sure if this is the intended behavior (hangs when server is unavailable).

pedrorochaorg commented 8 years ago

I have exactly the same issue on Windows , but in my case i don't have the takeShotOnCallbacksetted , only have timeoutand errorIfStatusIsNot200, when the phantomjs process reaches the given timeout , the process lives without getting killed like in a normal situation when everithing goes well

Arrow7000 commented 7 years ago

I have a similar problem. Webshot does seem to exit, but the phantomjs process is still running in the background, taking up about 62MB of RAM. Multiply this by several attempts for several pages and you end up with an exponential number of processes running in the background and not getting killed.

Is there going to be any update on this?