2 years 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
50 Replies
2 years ago
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
2 years ago
maybe you got ip ban? Railway has a cringe ip ban if you do a lot of requests from the same IP
2 years ago
its probably an IP ban then
2 years ago
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?
2 years ago
completely agree, nonsense to ban ip for a lot of requests
2 years 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
2 years ago
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...
2 years ago
or if maybe nextjs offers a way to throttle the static pages generation
2 years ago
as long as you don't do a lot in a short time, it should work, it'll probably be painful slow tho
2 years ago
thalles gave a very good answer -
deploy your nextjs project to Railway and use private networking
2 years ago
these 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
2 years ago
then its not an ip ban.. unless you live inside the aws data center?
2 years ago
and btw, can you still access the strapi through the browser after that happens?
2 years ago
thats not a ban then, thats strapi locking up
2 years ago
maybe its not? @bmariano are u still not able to access?
2 years ago
you can add more replicas to spread out the load
2 years ago
try to run the nextjs static generation, when you get an ip ban lmk that i'll try to access the strapi url
2 years ago
if it works for me then its an ip ban
2 years ago
they cant access it from their own computer after running a build on vercel
2 years ago
that would be two different ips
2 years ago
oh from vercel? got it wrong then
2 years ago
yeah these are vercel logs
2 years ago
go ahead and up the replica count to 3
2 years ago
while running next on railway wont help elevate any load from strapi, what is stopping you from deploying next to railway?
2 years ago
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
2 years ago
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
2 years ago
okay thats fair, thanks for sharing
2 years ago
sounds good

