Prevent Docker from closing connection after 10 minutes with slow mongosh commands? #5062
Unanswered
theDanielJLewis
asked this question in
Q&A
Replies: 1 comment 19 replies
-
@theDanielJLewis where are you using ssh from? i.e from your home pc to your server, then running docker exec manually or doing it via the coolify website ui?? |
Beta Was this translation helpful? Give feedback.
19 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using Coolify to manage my server, installing MongoDB via the Docker image as usual.
When I am in the database via
mongosh
, any slow commands (like deleting millions of documents or compacting a collection) sort of times out after 10 minutes with the errorMongoNetworkError: connection 2 to 127.0.0.1:27017 closed
(I'm SSH'd into the server, and thus the MongoDB is accessible via localhost). I say "sort of," because it seems most of the commands continue running, but I never get the response because of that error. For example, adb.collection.deleteMany()
should return a JSON object with the count of how many documents were deleted.Nothing I do on the MongoDB side fixes the problem. But I haven't had this problem when I ran MongoDB on a different server without Docker.
So based on some stuff I see online, I'm starting to suspect Docker could be the problem.
What should I check or change if, indeed, Docker is the cause for this apparent 10-minute limit?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions