After ~500 requests project timeouts in every request (kinda urgent).
bmariano
HOBBYOP

a year ago

Hi, I have a Strapi-Postgres project.

After ~500 requests, to generate individual static pages for each entry with Next.js, I cannot access the project anymore, every request timeouts.

It shows both Strapi and Postgres as active deployments, but they don't respond

I tried redeploying / restarting

https://fda-strapi.up.railway.app

50 Replies

bmariano
HOBBYOP

a year ago

ef73b672-1bce-4cbc-a2c1-441bb7dd0112


a year ago

hey, little confused, your strapi project is scraping (visiting each entry) in your nextjs project?


bmariano
HOBBYOP

a year ago

No.. Strapi works only as a CMS/API. I built my Next.js app locally and suddenly Strapi started to timeout, and I couldn't make any kind of request to it anymore


a year ago

maybe you got ip ban? Railway has a cringe ip ban if you do a lot of requests from the same IP


bmariano
HOBBYOP

a year ago

Well, It timed out from the server too…


bmariano
HOBBYOP

a year ago

1287800791117070300


a year ago

its probably an IP ban then


a year ago

your nextjs spin up, do a lot of requests from the same vercel IP and gets ip ban


bmariano
HOBBYOP

a year ago

This is nonsense. They should just charge my project for the usage. What if I'd have a project making 500 request per second? What I'm supposed to do then?


a year ago

completely agree, nonsense to ban ip for a lot of requests


a year ago

tbh i've no idea on how you can solve that, maybe deploy your nextjs project to Railway and use private networking? There's tailscale but I doubt its possible to spin up Tailscale in Vercel in a easy way


a year ago

this should be something for the team to lookup if possible, IMO its a platform problem


bmariano
HOBBYOP

a year ago

Now it's responding. Anyways, how I'm supposed to generate the 600 static pages…


a year ago

or if maybe nextjs offers a way to throttle the static pages generation


bmariano
HOBBYOP

a year ago

They could actually be 5000. It's a matter of time


bmariano
HOBBYOP

a year ago

Yes, I'll take a look


a year ago

as long as you don't do a lot in a short time, it should work, it'll probably be painful slow tho


a year ago

thalles gave a very good answer -

deploy your nextjs project to Railway and use private networking


a year ago

these are logs from vercel, when you see these logs, are you still able to access strapi from your own local computer?


bmariano
HOBBYOP

a year ago

Already tried to deploy Next.js to Railway. A site with 50 users per day would make the project cost $5 - $10 per month… that's why a pay for Vercel for that. I'd love to just deploy everything in Railway


bmariano
HOBBYOP

a year ago

In my PC it was the same, for a moment

1287803189160317000


a year ago

then its not an ip ban.. unless you live inside the aws data center?


a year ago

and btw, can you still access the strapi through the browser after that happens?


bmariano
HOBBYOP

a year ago

I couldn't access the strapi admin for about 10 minutes. Now I can


bmariano
HOBBYOP

a year ago


a year ago

thats not a ban then, thats strapi locking up


bmariano
HOBBYOP

a year ago

Yes.. that's what I thought


a year ago

maybe its not? @bmariano are u still not able to access?


a year ago

you can add more replicas to spread out the load


a year ago

try to run the nextjs static generation, when you get an ip ban lmk that i'll try to access the strapi url


a year ago

if it works for me then its an ip ban


bmariano
HOBBYOP

a year ago

Brody said it's not


a year ago

they cant access it from their own computer after running a build on vercel


a year ago

that would be two different ips


a year ago

oh from vercel? got it wrong then


bmariano
HOBBYOP

a year ago

I said "from the server" but yes, it was Vercel


a year ago

yeah these are vercel logs


a year ago

go ahead and up the replica count to 3


bmariano
HOBBYOP

a year ago

.


bmariano
HOBBYOP

a year ago

I'll try and let you know, give me a moment


bmariano
HOBBYOP

a year ago

Will that make it more expensive?


a year ago

while running next on railway wont help elevate any load from strapi, what is stopping you from deploying next to railway?


a year ago

slightly yes, since its running 3x of your strapi apps


bmariano
HOBBYOP

a year ago

Now I have like… 15 projects in Railway. ~12 have a Strapi and a Postgres DB. Once I thought that, I could bill to my clients exactly what I pay by just deploying everything in Railway since it has usage-based pricing, different from Vercel. When I added the Next.js app to the project, the pricing basically doubled even they had ~1000 users per month


bmariano
HOBBYOP

a year ago

I did that with 2 projects I think


a year ago

so what you are saying is that next on railway costs more than next on vercel given your current user base?


bmariano
HOBBYOP

a year ago

Yes, I pay the $20 of Vercel and I have 50 Next apps there. Some apps are used by 50k users/m, others are simple websites for 200 users


a year ago

okay thats fair, thanks for sharing


bmariano
HOBBYOP

a year ago

I'll try increasing the replicas and let you know here, thank you


a year ago

sounds good


Loading...