Puppeteer closes the browser after some minutes of inactivity?

does anyone know if railway has a kind of timeout if a server has no movement? i.e. if there is no movement in an open browser with puppeteer or in the app in general... the server restarts at the next request or movement? maybe railway pauses the container in general if there are no incoming requests?
6 Replies
Percy
Percy2mo ago
Project ID: N/A
SCIENTIFIC
SCIENTIFIC2mo ago
Do you have App Sleeping turned on?
danielthames
danielthamesOP2mo ago
nope
No description
Brody
Brody2mo ago
nope, railway is not serverless, and wont stop your container unless you enable that. any inactivity timeouts come from the apps running inside the container. you would want to read browserless's docs.
danielthames
danielthamesOP2mo ago
I did a magic trick, because before, my puppeteer browser was waiting for instructions but when it was called for example after 3 hours it seemed that the browser was no longer active and got errors... that's the reason of my question (maybe the browser closes out after inactivity) now I'm doing that with a settimeout something moves on the browser screen every 10min and after 4 hours everything is still working great... this is something weird lol
Duchess
Duchess2mo ago
New reply sent from Help Station thread:
My advice is to switch to selenium. There is already a template in railway to host a selenium web driver and you can request a driver from it internally. Here's an example in pythonfrom selenium import webdriveroptions = webdriver.ChromeOptions() // Or similarly FirefoxOptions etc... any options needed here like "--headless"driver = webdriver.Remote('{internal-selenium-address}', options=options
You're seeing this because this thread has been automatically linked to the Help Station thread.
Want results from more Discord servers?
Add your server