-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stopping replica instances times out (MongoDB 4.8.0 close times-out) #676
Comments
please provide more of the debug output, just this section is not enough also just to be on the same page: debug's times reference the last message form the same namespace |
@hasezoey updated the log output 👍 I know the times are a reference but these particular lines: MongoMS:utils Mongo[46089] killProcess: given childProcess's PID was not alive anymore +35s
MongoMS:utils Mongo[46089] killProcess: given childProcess's PID was not alive anymore +0ms Might indicate something is not working as expected. |
from what i can tell from the updated log, i dont see anything actually wrong, though the following line is weird that it has 30s
also are you sure you are spinning up 2 servers? because the log indicates that just one is ever started (also, dont use even numbers in replsets, use odd numbers) PS: how are you shutting down the instance? in a |
I initially had the teardown on I've also created a blank project with minimal dependencies and run tests with 2, 3 and 5 replicas and the behavior is the same. They all show this 30s+ delay on the first cleanup. MongoMS:utils Mongo[38679] killProcess: given childProcess's PID was not alive anymore +34s
MongoMS:utils Mongo[38679] killProcess: given childProcess's PID was not alive anymore +1ms
MongoMS:MongoInstance Mongo[38679]: stop: Instance Finished Shutdown +29s
MongoMS:utils Mongo[40985] killProcess: given childProcess's PID was not alive anymore +2ms
MongoMS:utils Mongo[40985] killProcess: given childProcess's PID was not alive anymore +0ms
MongoMS:MongoInstance Mongo[40985]: stop: Instance Finished Shutdown +2ms
MongoMS:utils Mongo[40627] killProcess: given childProcess's PID was not alive anymore +505ms
MongoMS:utils Mongo[40627] killProcess: given childProcess's PID was not alive anymore +0ms
MongoMS:MongoInstance Mongo[40627]: stop: Instance Finished Shutdown +505ms
MongoMS:utils Mongo[46429] killProcess: given childProcess's PID was not alive anymore +18ms
MongoMS:utils Mongo[46429] killProcess: given childProcess's PID was not alive anymore +0ms
MongoMS:MongoInstance Mongo[46429]: stop: Instance Finished Shutdown +18ms
MongoMS:utils Mongo[35083] killProcess: given childProcess's PID was not alive anymore +0ms
MongoMS:utils Mongo[35083] killProcess: given childProcess's PID was not alive anymore +0ms
MongoMS:MongoInstance Mongo[35083]: stop: Instance Finished Shutdown +0ms
MongoMS:MongoMemoryReplSet cleanup for "5" servers +32s
MongoMS:MongoMemoryReplSet cleanup: { doCleanup: true, force: false } +0ms
MongoMS:MongoMemoryServer Mongo[40985]: cleanup: { doCleanup: true, force: false } +32s
MongoMS:MongoMemoryServer Mongo[40985]: cleanup: removing tmpDir at /tmp/mongo-mem--2024-T9vXYeqZiY3h +0ms
MongoMS:MongoMemoryServer Mongo[38679]: cleanup: { doCleanup: true, force: false } +4ms
MongoMS:MongoMemoryServer Mongo[38679]: cleanup: removing tmpDir at /tmp/mongo-mem--2024-812QcQU40dOi +0ms
MongoMS:MongoMemoryServer Mongo[35083]: cleanup: { doCleanup: true, force: false } +1ms
MongoMS:MongoMemoryServer Mongo[35083]: cleanup: removing tmpDir at /tmp/mongo-mem--2024-5SLv5xFRCkM9 +0ms
MongoMS:MongoMemoryServer Mongo[46429]: cleanup: { doCleanup: true, force: false } +2ms
MongoMS:MongoMemoryServer Mongo[46429]: cleanup: removing tmpDir at /tmp/mongo-mem--2024-HQaehJtth6eI +0ms
MongoMS:MongoMemoryServer Mongo[40627]: cleanup: { doCleanup: true, force: false } +1ms
MongoMS:MongoMemoryServer Mongo[40627]: cleanup: removing tmpDir at /tmp/mongo-mem--2024-bCR88P45aF4z +0ms
mongo memory server stopped
Done in 36.33s. |
Just ran a test on a GitHub Actions runner and the behavior is the same: Test Suites: 3 passed, 3 total
Tests: 3 passed, 3 total
Snapshots: 0 total
Time: 11.994 s
Ran all test suites.
Done in 54.39s. As you can see, the tests completed on |
could you provide your mentioned test repository for me to investigate? |
Of course: https://github.com/stgogm/mongoms-issue-676 Added you to the repo as well so you can check the actions logs. |
Can reproduce and i also dont see any misconfiguration. After some testing i noticed that the problem is the mongodb nodejs driver, because reverting it from opened a mongodb issue: https://jira.mongodb.org/browse/NODE-4429 |
Thank you so much @hasezoey ! |
for now i have put a workaround in place: 8a5552a (only with 8.8.0) that pins the version to 4.7.x |
Apparently, the bug in mongodb has been fixed with version 4.9.0 |
🎉 This issue has been resolved in version 8.9.0-beta.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 8.9.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Versions
package: mongo-memory-server
What is the Problem?
When stopping a replica set (
MongoMemoryReplSet
), in takes about 30s to complete (timing out?). Does not happen with single instance (MongoMemoryServer
).Code Example
Debug Output
Debug Output
Do you know why it happenes?
no
The text was updated successfully, but these errors were encountered: