Closed diamondraras closed 4 years ago
Thanks for the tips, that makes sense. I would gladly take and accept a PR with the .close()
call added. I can try and update it in the near future if I dont hear back.
@diamondraras I've added the page.close()
call here. I watched the memory output in the docker container with docker stats
and it the close call looks like it helped. I've also upgraded deps in the 0.12.x version.
docker run --rm -p 3000:3000 -m 256m jasonraimondi/url-to-png:0.12.1
And in a separate terminal:
docker stats
Thanks for the comment!
the captures of each pages are stored in the memory and are not freed therefore usable in production it is preferable to close() image buffer after each request