Idea
I was usually using MongoDB for my project in the past. But recently, I felt that MongoDB doesn't interact with Next.js server functions in Vercel. It was working well on my local but if it is deployed on Vercel and as many as users are using it, it causes runtime error. so I started integrating PostgreSQL like NeonDB in Vercel. I am not sure that's why Vercel doesn't support MongoDB integration but I think this problem should be solved finally. Thanks Vercel team.
This is one of my server actions code.
In normal case, it's okay but it's causing stream connection error with MongoDB if many users are running this kind of request at same time.