Online-Crash-Gambling-Simulator
Online-Crash-Gambling-Simulator copied to clipboard
MongooseError: Operation `game_loops.findOne()` buffering timed out after 10000ms
it wont stop giving me this error: MongooseError: Operation game_loops.findOne()
buffering timed out after 10000ms
it happens when i run npm start on backend
Where are you hosting your MongoDB server? Make sure you put the proper link to connect to it in the environment variables.
Im also having this problem. Im hosting on MongoDB Atlas any my connect part in server.js in backend looks like this
mongoose.connect(
"mongodb+srv://USER:[email protected]/?retryWrites=true&w=majority",
{
useNewUrlParser: true,
useUnifiedTopology: true,
},
);
so I think it shouldn't be about proper link. I didn't use env variable because MONGOOSE_DB_LINK variable in connect gave me errors but replacing it with actual link didn't give any error.
Having this issue as well, did the same code as KentuckyFriend.