Unexpected Crashes of Playwright in Headful Chromium Mode

I am experiencing unexpected crashes when running Playwright in headfull mode using the Chromium browser within a Docker container on Render. The application deploys fine to Render, but when a request is made to an endpoint within the container that launches the Playwright browser instance in headfull mode, it crashes with the error message “Unexpected error occurred: Page crashed.”

I am unsure if this issue is related to resource limits, as I am unable to check metrics on a free plan, or if it is due to another underlying factor.

I would appreciate any insights or recommendations on how to diagnose and resolve this issue.

Just wanted to point out that this container setup of running playwright headfully in a docker container works locally without crashing. Should I be providing addtional details? I wanted to keep the repository private but if the situation can’t be debugged without seeing the repository I guess I’ll have to make it public, let me know, please and thanks.

that’s probably because 512mb of ram isn’t enough for it to launch an instance of chromium. Well i have never used playwright but i have used puppeteer which works fine on render. try considering switching to puppeteer if you can or else you may have to switch from render

You’ve been able to run an instance of puppeteer in headfull mode on render using the free tier?

thanks in advance

No, you cannot run it in headful mode as render does not support GUI, you can only run it in headless mode

And yes in the free tier.

Also why you wanna run it in that mode, if you can specify that then i can help.

In another project I was able to run playwright in a headless mode as well, but for this current project it needs to be ran in headfull mode.

I containerized it into a docker image and locally it works and all, and I think it might work on render too but cant tell unless I pay for more resources.

Thank you for the support

I don’t think you can run it in headful mode as render does not support it.

There is no point in paying for more resources.

Go for AWS or Azure, and if you don’t want to then you can apply some workaround:

like for instance if you just wanna mimic the headful mode in headless mode then heres the article here: selenium webdriver - How to mimic headful browser in headless mode in puppeteer - Stack Overflow

I didn’t think of that possibility, might work. I’ll check it out. Thank you for the support.