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
50 Replies
a year 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
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
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
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
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
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?
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
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?
a year ago
thats not a ban then, thats strapi locking up
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
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
a year ago
yeah these are vercel logs
a year ago
go ahead and up the replica count to 3
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
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
a year 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
a year ago
okay thats fair, thanks for sharing
a year ago
sounds good

