Vercel error connect ECONNREFUSED 127.0.0.1:3000
Answered
Николя posted this in #help-forum
НиколяOP
I'm trying to install my project on vercel, but there's this problem, what's causing this? I seem to have changed everything from local
Answered by joulev
seems like you are fetching your own route handlers. something like fetch("http://localhost:3000") or fetch("http://127.0.0.1:3000"). [don't do that](https://nextjs-faq.com/fetch-api-in-rsc)
10 Replies
Madeiran sardinella
It looks like you're not hitting the db host
@Madeiran sardinella It looks like you're not hitting the db host
НиколяOP
Please, I have a database on google cloud, and everything works locally
And it`s 127.0.0.1:3000 my local host, i don't I don't understand what he has to do with it
Madeiran sardinella
Your app is on vercel and your db in gcp, right?
Show me your db config
@Николя I'm trying to install my project on vercel, but there's this problem, what's causing this? I seem to have changed everything from local
seems like you are fetching your own route handlers. something like fetch("http://localhost:3000") or fetch("http://127.0.0.1:3000"). [don't do that](https://nextjs-faq.com/fetch-api-in-rsc)
Answer
@joulev seems like you are fetching your own route handlers. something like fetch("http://localhost:3000") or fetch("http://127.0.0.1:3000"). [don't do that](<https://nextjs-faq.com/fetch-api-in-rsc>)
НиколяOP
Yes, I thought so too, but I checked everything many times, I can’t figure out what’s wrong
For example
Oh, i fix it

@joulev seems like you are fetching your own route handlers. something like fetch("http://localhost:3000") or fetch("http://127.0.0.1:3000"). [don't do that](<https://nextjs-faq.com/fetch-api-in-rsc>)
НиколяOP
Have a nice time bro,idon’t understand why, but after update 3 this error disappeared