After ~500 requests project timeouts in every request (kinda urgent).
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
38 Replies
Project ID:
ef73b672-1bce-4cbc-a2c1-441bb7dd0112
ef73b672-1bce-4cbc-a2c1-441bb7dd0112
hey, little confused, your strapi project is scraping (visiting each entry) in your nextjs project?
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
maybe you got ip ban? Railway has a cringe ip ban if you do a lot of requests from the same IP
Well, It timed out from the server too...
its probably an IP ban then
your nextjs spin up, do a lot of requests from the same vercel IP and gets ip ban
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?
completely agree, nonsense to ban ip for a lot of requests
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
this should be something for the team to lookup if possible, IMO its a platform problem
Now it's responding. Anyways, how I'm supposed to generate the 600 static pages...
or if maybe nextjs offers a way to throttle the static pages generation
They could actually be 5000. It's a matter of time
Yes, I'll take a look
as long as you don't do a lot in a short time, it should work, it'll probably be painful slow tho
thalles gave a very good answer -
deploy your nextjs project to Railway and use private networkingthese are logs from vercel, when you see these logs, are you still able to access strapi from your own local computer?
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
In my PC it was the same, for a moment
then its not an ip ban.. unless you live inside the aws data center?
and btw, can you still access the strapi through the browser after that happens?
I couldn't access the strapi admin for about 10 minutes. Now I can
https://fda-strapi.up.railway.app
thats not a ban then, thats strapi locking up
Yes.. that's what I thought
maybe its not? @bmariano are u still not able to access?
Solution
you can add more replicas to spread out the load
try to run the nextjs static generation, when you get an ip ban lmk that i'll try to access the strapi url
if it works for me then its an ip ban
Brody said it's not
they cant access it from their own computer after running a build on vercel
that would be two different ips
oh from vercel? got it wrong then
I said "from the server" but yes, it was Vercel
yeah these are vercel logs
go ahead and up the replica count to 3
.
I'll try and let you know, give me a moment
Will that make it more expensive?
while running next on railway wont help elevate any load from strapi, what is stopping you from deploying next to railway?
slightly yes, since its running 3x of your strapi apps
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
I did that with 2 projects I think
so what you are saying is that next on railway costs more than next on vercel given your current user base?
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
okay thats fair, thanks for sharing
I'll try increasing the replicas and let you know here, thank you
sounds good