-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Occasional StdoutInstanceError: Port "39697" already in use
with v10.0.0
#883
Comments
this is to workaround the VM potentially executing another instance's getport before the other one could start the binary. re #883
thanks for reporting, debugging those issues is quite hard as they are likely sporadic and can depend on a lot of external values, so i dont know if this can be fixed "for good". in any case, i have done 2 changes in the hopes of that those were what may have caused this issue this time, they are available for now in as a off-topic question regarding your workflow, why do Log exampleinfo - 2024-08-03 08:03:50,667 -- > /home/runner/work/mikro-orm/mikro-orm/coverage/lcov.info
info - 2024-08-03 08:03:50,667 -- > /home/runner/work/mikro-orm/mikro-orm/coverage/coverage-final.json
info - 2024-08-03 08:03:50,667 -- > /home/runner/work/mikro-orm/mikro-orm/coverage/clover.xml |
Thanks for the prompt fix in the blind, updated to beta and removed the manual retries, will let you know if it happens again, the initial build passed just fine. The Btw a connected question, I tried using the |
TL;DR: either use PS: i will let this issue stay open for a while (lets say a month) before closing. |
FYI I use this package only for transaction-related tests, since I never found a working setup for docker with replicasets and this just works. But using this for everything yields much slower results on my end, at least locally, there are just a few tests that use transactions in mongo (like 3 or 4, vs ~700 of the rest), I am more than happy with using both this and the docker instance (docker is mandatory because of other drivers anyway, this is just another service in the compose file). So I was thinking I could use the mongo instance I already have around, it shouldn't be relevant if its installed on the system or via docker, right? |
if i understand correctly, then yes, you can use that singular instance for your other tests, but mongodb-memory-server will not interact with it in any way (ie making it part of a replicaset).
i would be a bit interested into why this is, so some questions:
also what do you mean with "everything yields much slower results" more exactly, each operation taking longer or just the whole setup / teardown or literally everything about it? |
yes, yes and i guess yes as well, that's a good point, i just tried to use the same connection uri in ~20 more tests, and they started taking ages (10-20s each vs a second or two with native mongo), its not the setup/teardown, nothing changed about that by everything i mean tests that use mongo take much longer, i guess it adds up as i am running 8 workers locally. I'll try how it works if i create a separate single instance for rest of the tests that don't need transactions |
FYI this haven't happened again since your fix. |
I'll close this one, never happened since your fixes, thanks again! |
thanks for the testing, the beta changes have now been released as |
Versions
package: mongo-memory-server-core
What is the Problem?
After upgrade to v10, I've hit this error once in the CI:
Most likely the same as the initial issue in #827.
Code Example
Based on the docs, jest with global setup/teardown, nothing special.
mikro-orm/mikro-orm@5dfe27a
Debug Output
Didn't happen locally, I don't have time to hunt that in the CI, added manual retry instead (mikro-orm/mikro-orm@677ff1b).
Do you know why it happenes?
no
The text was updated successfully, but these errors were encountered: