I am not able to connect mongoDB with my next js project
heyakhil
HOBBYOP

a year ago

I am building a project in next js and I am not able to connect with it
I think is issue is due to te prisma i am using in my project that's why i am getting this error

Error in creating user with email {

'Invalid prisma.login.deleteMany() invocation:\n' +

'Prisma needs to perform transactions, which requires your MongoDB server to be run as a replica set. https://pris.ly/d/mongodb-replica-set';

}

Solved

3 Replies

The error suggests you need to configure your MongoDB server as a replica set to use it with Prisma, rather than as a single instance. You can find a Railway Template for a High-Availability MongoDB template with replica sets here.


Status changed to Awaiting User Response Railway 12 months ago


heyakhil
HOBBYOP

a year ago

Please check the attachment i have created replica set but still i am getting this error and also i don't know why it is showing "paused from exceeding limit".

Attachments


Status changed to Awaiting Railway Response Railway 12 months ago


paused from exceeding limit

This happens if you had a Hard Usage Limit configured on your account. In that case, if your limit is reached, your resources are stopped.

Please check the attachment i have created replica set

Per your screenshot, you only have a single instance of MongoDB, and it can therefor not be configured as a replica set. Please take a look at the template I linked above. If you are not set on using MangoDB with Prisma, you can also consider using another database service that doesn't require replicas, such as PostgreSQL. There's a starter template for Prisma with PostgreSQL available here for inspiration.


Status changed to Awaiting User Response Railway 12 months ago


Railway
BOT

6 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 6 months ago


Loading...