D
Dokploy5mo ago
naz

MongoDB buffering timed out

Hi, I have just deployed my Next.js app on DokPloy that uses MongoDB and I am facing this error My VPS is a 2 vCore, 2 Go RAM, 20 Go SDD
No description
14 Replies
naz
nazOP5mo ago
Also when it try to fetch the jobs from the home page, I get this error
npm WARN config production Use `--omit=dev` instead.

> next start

▲ Next.js 15.0.4
- Local: http://localhost:3000

✓ Starting...
✓ Ready in 507ms
MongooseServerSelectionError: getaddrinfo ENOTFOUND job-board-nextjs-db-cryvwf
at _handleConnectionErrors (/app/node_modules/mongoose/lib/connection.js:909:11)
at NativeConnection.openUri (/app/node_modules/mongoose/lib/connection.js:860:11)
at async s (/app/.next/server/app/api/job/route.js:1:1520) {
reason: [TopologyDescription],
code: undefined
}
MongoDB errorMongoServerSelectionError: getaddrinfo ENOTFOUND job-board-nextjs-db-cryvwf
npm WARN config production Use `--omit=dev` instead.

> next start

▲ Next.js 15.0.4
- Local: http://localhost:3000

✓ Starting...
✓ Ready in 507ms
MongooseServerSelectionError: getaddrinfo ENOTFOUND job-board-nextjs-db-cryvwf
at _handleConnectionErrors (/app/node_modules/mongoose/lib/connection.js:909:11)
at NativeConnection.openUri (/app/node_modules/mongoose/lib/connection.js:860:11)
at async s (/app/.next/server/app/api/job/route.js:1:1520) {
reason: [TopologyDescription],
code: undefined
}
MongoDB errorMongoServerSelectionError: getaddrinfo ENOTFOUND job-board-nextjs-db-cryvwf
for the second error, I think it's the env varable that I don't know which one to use local or on the internet I should better spliiit this question into three diffrent posts, but anyway that's it
Adek
Adek5mo ago
Hey, I never used mongodb with next but it seems you're not defining the env for connecting. I read some problems with internal IPs so use internet ip for now. Which ORM do you use?
naz
nazOP5mo ago
Hi Adek, I use mongoose
naz
nazOP5mo ago
No description
naz
nazOP5mo ago
No description
naz
nazOP5mo ago
Now I have this error Should I open a new thread ?
DJKnaeckebrot
DJKnaeckebrot5mo ago
Is your servers firewall open on that port?
naz
nazOP5mo ago
Yes, I haven't setted up a firewall all the DokPloy installation is by default
DJKnaeckebrot
DJKnaeckebrot5mo ago
You could test from your pc in powershell Test-NetConnection 135.125.75.152 -Port 27017 If that fails there is a firewall somewhere that blocks the port. Might even be with your vps provider
DJKnaeckebrot
DJKnaeckebrot5mo ago
Test-NetConnection (NetTCPIP)
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
naz
nazOP5mo ago
No description
naz
nazOP5mo ago
I don't know why it worked before, I don't think that the VPS provider blocks the 27017 port
naz
nazOP5mo ago
No description
naz
nazOP5mo ago
In the meantime I have this error in the logs Okey so I have changed the port to 27018 and it seems to work Thank you very much for pointing me to the right direction

Did you find this page helpful?