microlinkhq / browserless

The headless Chrome/Chromium driver on top of Puppeteer.
https://browserless.js.org
MIT License
1.63k stars 81 forks source link

BrowserlessError: EBRWSRTIMEOUT, Promise timed out after 30000 milliseconds #450

Closed theMoe closed 1 year ago

theMoe commented 1 year ago

How can I change the timeout?

Kikobeats commented 1 year ago

Hello, see https://browserless.js.org/#/?id=initializing-a-browser 🙂

theMoe commented 1 year ago

Hi, thanks! If I run my code on a local MacBook, the code works fine without any issues. But if I run the same code on a Ubuntu VPS I get this timeout error. Any idea to solve it?

Kikobeats commented 1 year ago

Probably the VPS machine resources needs to be higher.

Try with a dedicated CPU with at least 2 CPUs and 4GB of memory.

theMoe commented 1 year ago

Okay, its not a dedicated CPU but if I run the code on ubuntu with e.g. npm run start, it works fine.

If I run it as systemctl service, the code takes way longer or runs into a timeout.

theMoe commented 1 year ago

Maybe I found the solution. The tasks of the service were limited to 60. I changed the task limit now to 120 and it seems to work.