Open LinusU opened 2 years ago
You might try increasing the timeout of the lambda function.
In my case, I do use serverless framework, so I have a config file like this
functions:
playwright:
handler: handler.playwright
events:
- httpApi:
path: /playwright
method: get
timeout: 120
serverless.yml
You might try increasing the timeout of the lambda function.
I don't think that this is a Lambda timeout issue. I'm getting the indicated response right away, and it has a stack trace that points into playwright-core
.
Anyone has a solution? I have the same problem.
We ended up restarting the browser for every call, but I'm very interested in a proper solution!
There's no guarantee that a Lambda will maintain state from one execution to the next. It may, but it is impossible to control. There's a lot of factors that go into this.
If you need have more control over this, you might want to use a long-lived service such as one in ECS.
Whenever I try to keep the browser open between invocations, it seems like the browser gets closed/killed.
This is the error I'm getting after the first invocation:
This is roughly the code I'm using:
Do you know if this is a limitation of Lambda, or is there something else going on here? 🤔