0

I made a scraper with puppeteer and I didn't specified any port for serving it. it just runs and scrape data and exits with process.exit() command.

I deployed it to heroku with cli but after running it throw error:

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch.
Stopping process with SIGKILL
Process exited with status 137

whats wrong?

ShaSha
  • 589
  • 3
  • 9
  • 24
  • Have you applied everything mentioned here: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-puppeteer-on-heroku? (heroku build pack installed, launch flags added) – theDavidBarton May 04 '21 at 19:51
  • yes i added buidpack – ShaSha May 05 '21 at 09:25
  • It's not clear when your scraper should run. You'll probably want to use a scheduler or clock. Examples of both are in [Puppeteer on Heroku Error R10 (Boot timeout) Node (webscraping app)](https://stackoverflow.com/questions/67498169/puppeteer-on-heroku-error-r10-boot-timeout-node-webscraping-app/67595949#67595949) – ggorlen May 19 '21 at 01:59
  • Does this answer your question? [Puppeteer on Heroku Error R10 (Boot timeout) Node (webscraping app)](https://stackoverflow.com/questions/67498169/puppeteer-on-heroku-error-r10-boot-timeout-node-webscraping-app) – ggorlen May 19 '21 at 01:59

1 Answers1

0

Looks like you have a Web Dyno so the app must bind to $PORT.

You can instead define a worker (in the Procfile) if you do not need incoming HTTP requests.

Beppe C
  • 11,256
  • 2
  • 19
  • 41