Puppeteer instances failing for concurrent requests
rishimohan
PROOP

a year ago

Hi, I'm running an image generation service in a Node.js app hosted on Railway(Pro plan) with 3 replicas

User makes request to the endpoint and the app returns back the image

It was running all good until a user started making multiple concurrent requests, it was like 10 to 20 requests per second

The app started throwing the attached errors which seems related to Puppeteer instances failing. I restarted the service and it seemed to fix the issue, but then it happened again some time later

Would appreciate help fixing it

The error screenshots: https://imgur.com/a/81f8lMo

Solved

2 Replies

rishimohan
PROOP

a year ago

Apologies there was no option to attach images so I uploaded it on imgur sweat_smile emoji


echohack
EMPLOYEE

a year ago

While we typically don't offer support for application-specific issues, I think the answer here is fairly obvious from your logs. I think essentially you got hit with a flood of activity that spiked a denial of service on your application. Have you considered adding more replicas or pooled workers for your service?

You can also debug further with railway ssh for your services.

Finally, you may want to consider putting a Cloudflare Proxy in front of your public networking. A DDOS attack or spike of services can bring your service offline.


Status changed to Awaiting User Response Railway 11 months ago


Status changed to Solved echohack 11 months ago


Loading...