Operation
model.find()
buffering timed out after 10000ms
Anonymous
TRIALOP

2 years ago

Hello all. I tried posting about this in a group for nodejs but as they could not find any issue with my js code. That in combination with the error messages I am getting lead me to believe that my issue has something to do with my MongoDB database provided via Railway.

The issue is this. Whenever I load a page in my railway site that requires a mongoose/MongoDB model, the page fails to load, instead leaving me with this error message:

Operation model.find() buffering timed out after 10000ms
Pages that do not call mongoose models load fine, so this seems to be a database access issue.

The MongoDB database also keeps on crashing. (though the error is there even before the database crashes). When I look at the database logs it contains roughly 100 lines of this error message:

/bin/bash: line 1: [docker-entrypoint.sh](docker-entrypoint.sh): command not found
I'm not sure what the docker-entrypoint is so I'm not sure how I should address this. I've double checked and the variable for my MongoDB connection string is correct.

Does anyone know what the issue is, and/or how to address the error message that the database is logging?

38 Replies

Anonymous
TRIALOP

2 years ago

abeecb1e-76d2-4680-a353-53c6614e1ff9


brody
EMPLOYEE

2 years ago

what is the current deployment status of mongo?


Anonymous
TRIALOP

2 years ago

Its currently crashed

1235383736540074000


brody
EMPLOYEE

2 years ago

can you send the build logs of the mongo service please -


Anonymous
TRIALOP

2 years ago

sure. here you go. thanks for your help

1235384625325674516


brody
EMPLOYEE

2 years ago

whats the source of the mongo service? (check its settings)


Anonymous
TRIALOP

2 years ago

Im not sure if I understand the question. Do you need the connection string?


brody
EMPLOYEE

2 years ago

check its settings then you will be able to answer the question 🙂


Anonymous
TRIALOP

2 years ago

ah i see, my bad. the source is mongo

1235385977447514000


brody
EMPLOYEE

2 years ago

can you send a full screenshot of your project canvas


Anonymous
TRIALOP

2 years ago

is this what you are looking for?

1235386656903663600


brody
EMPLOYEE

2 years ago

looks like you may have ran railway up while linked to the mongo service instead of the toothpaste service


brody
EMPLOYEE

2 years ago

go into the mongo service and find the latest deployment that says mongo on it and use that deployment's 3-dot menu to redeploy


Anonymous
TRIALOP

2 years ago

Okay that seems to have fixed part of the issue, thank you. MongoDB does not seem to be crashing and the build logs are no longer producing any error messages. I am still getting the buffering timed out message. I will try to run my site locally with a separate mongo database to see if the issue is with the database or with my code


brody
EMPLOYEE

2 years ago

okay let me know how that goes and then we will go from there


Anonymous
TRIALOP

2 years ago

huh, so i am getting this when i try to login. when i switch browsers both are unable to load past the login page. it looks like the website is currently up though. and i think it would be bigger news if mongodb servers were actually down. so im not sure

1235391305887121400


brody
EMPLOYEE

2 years ago

so you are using atlas when developing locally?


Anonymous
TRIALOP

2 years ago

looks like they are actually having issues https://status.mongodb.com/


brody
EMPLOYEE

2 years ago

just trying to understand why you have mongo deployed on railway, yet are still using atlas?


Anonymous
TRIALOP

2 years ago

im trying to figure out if the problem is with railway or with mongodb. i was having issues with railway, so im switching to atlas, to see if that improves things


brody
EMPLOYEE

2 years ago

well atlas is not happy right now, try using mongo on railway now that is not crashed


Anonymous
TRIALOP

2 years ago

okay, that is why i came here initially


brody
EMPLOYEE

2 years ago

so let me know how connecting to railway hosted mongo goes


Anonymous
TRIALOP

2 years ago

its not going well. im getting an error saying

Operation toothpastes.findOne() buffering timed out after 10000ms


brody
EMPLOYEE

2 years ago

can you show me your code that starts the mongo client?


Anonymous
TRIALOP

2 years ago

sure, here you go

const dotenv = require('dotenv');

var app = express();
dotenv.config();

const mongoose = require('mongoose');
mongoose.set("strictQuery", false);
const mongoDB = process.env.MONGO_URL;

main().catch((err) => console.log(err));
async function main() {
  await mongoose.connect(mongoDB);
};

brody
EMPLOYEE

2 years ago

your toothpaste service, does it have a MONGO_URL service variable?


Anonymous
TRIALOP

2 years ago

it does


Anonymous
TRIALOP

2 years ago

I just checked, and it points to the railway database, so i dont think that is the issue


brody
EMPLOYEE

2 years ago

is that buffering error the only error you get?


Anonymous
TRIALOP

2 years ago

ive managed to get it to work. thank you for your help


brody
EMPLOYEE

2 years ago

oh that's great, what was the issue?


Anonymous
TRIALOP

2 years ago

im honestly not entirely sure


Anonymous
TRIALOP

2 years ago

it just started working again


brody
EMPLOYEE

2 years ago

that's the worst kind of fixed


Anonymous
TRIALOP

2 years ago

hahaha yeah


Anonymous
TRIALOP

2 years ago

anyway thanks again for the help. a job like yours would require an extremely patient personality so kudos to you


brody
EMPLOYEE

2 years ago

happy to help!


Loading...