9 months 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
2 Replies
9 months ago
Apologies there was no option to attach images so I uploaded it on imgur 
9 months 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 • 10 months ago
Status changed to Solved echohack • 10 months ago