screenshot-stream
screenshot-stream copied to clipboard
Kill phantom process
Phatom itself doesn't seem to leak memory for me, however, when I close the screenshot stream
, it seems like about ~40mb of data get left behind resulting in a serious memory leak.
I'm assuming that phantom is leaving something hanging around on its end, or not exiting?
It happens every time the node server throws Error: ECONNRESET
.
I only write this as an issue here since I've attached an on('error')
to every stream in my server, yet memory continues to leak. Perhaps a stream is getting left behind in index.js
?
This one, maybe: https://github.com/kevva/screenshot-stream/blob/master/index.js#L56
Not much we can do based on this information, but you could probably use node --inspect
in latest Node.js version to inspect memory usage using DevTools and see where it's coming from.