2018-03-23 07:24:15 UTC
My backend is made of an Express application exposing many endpoints that
interact with the MongoDB nodeJS driver.
I have set up a *cron *that calls one of my endpoints every 15 minutes, and
in this specific endpoints I have a huge aggregation pipeline being
The issue that I'm facing is that after 4-5 hours this query will simply
stop returning documents.
- My crontab is running without any problem. This endpoint is sending a
message to a private slack channel and I can see it popping up every 15
minutes like I wanted.
- I know that my aggregation stopped working because this message that I
receive in Slack tells me how many documents were found by that query.
- I also log this aggregation's result to a separate collection, so the
connection with my DB is not a problem.
*CATCH 1: *I can copy this same aggregation command (with the Express app
still running) and put it into Robo 3T/Mongo Shell, execute it and *STILL*
get results out of it. It's as if my application simply can't see that data
in the database.
*CATCH 2: *As soon as I restart my express application this aggregation
will find all the data that has been "stuck" since the past few hours. This
makes me think that the MongoDB node driver might be the culprit.
I've found a guy with the same issue on StackOverflow but no one has
answered that question yet.
The only difference between this issue and mine is that I don't use
You received this message because you are subscribed to the Google Groups "mongodb-user"
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/febe016e-4c2f-4048-9a00-53e559b43521%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.