Open deldrid1 opened 3 years ago
I have a similar issue with this, similar use case. I am using puppeteer to navigate to a URL with mapbox-gl. It works fine for images at A4 and A3 but crashes with Target Closed if I try the browser at A2 size. To do this I am setting this window size in the args. This forces the map to be the right size when I navigate to it. Like @deldrid1 it works fine locally or in an EC2 instance for all sizes even up to A0 but on Lambda it only works up to A3.
Should be fixed with this: https://aws.amazon.com/blogs/aws/aws-lambda-now-supports-up-to-10-gb-ephemeral-storage/
@ahansson89 - have you done any testing with this to see how it affects performance?
I'm curious if anyone has done any evaluation on increasing this size vs. memory (and therefore vCPU) for puppeteer? From my testing, I see that /tmp
is often HIGHLY utilized (i.e. 99% full) after running puppeteer (see https://medium.com/wix-engineering/how-to-debug-enospc-on-aws-lambda-2a74ae457fcb and https://gist.github.com/yurynix/6beef61ec4189b37fad0c86bf9fe21b7 for some brilliant tools to help with visibility here) so this is a very intriguing new lambda capability!
Should be fixed with this: https://aws.amazon.com/blogs/aws/aws-lambda-now-supports-up-to-10-gb-ephemeral-storage/
Yeah it does indeed for me.
@deldrid1 I don't see why performance would be affected - certainly not going to do any performance testing
Yes, that is the issue that is causing this. /tmp filling up as images or the WebGL canvas is downloaded to the /tmp folder. Now that you can increase the size, you should be good creating large PDFs or Screenshots.
Environment
chrome-aws-lambda
Version:5.5.0
puppeteer
/puppeteer-core
Version:5.5.0
Mac
v12.18.3
nodejs12.x
Expected Behavior
This code attempts to take a very large screenshot of a map using Mapbox GL JS. Everything works fine locally but fails in AWS. I believe it is related to https://github.com/alixaxel/chrome-aws-lambda/issues/61, however, I haven't found any workarounds that actually work (it looks like most of the CLI flags, etc. have all made their way into
chromium.args
)...@alixaxel - if this is "asked an answered" feel free to close, but I would love to work with you to figure out if there is a workaround that we can come up with to prevent chrome from using
/tmp
(assuming that is in fact the issue)!Current Behavior
Steps to Reproduce
Full code for reproduction available at: https://gist.github.com/deldrid1/43e4e0996060331d6b8340f237f418de.
Logs
Expected Log Output
AWS Log Output