-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
Unstable connections to containers #740
Comments
You'll probably have to explore the suggestion it made: "This probably means the server terminated abnormally" There's likely nothing Colima can do to help you sort this out. See if the server exited though... You may want to turn off your AFAIK DDEV's postgresql handling is fine with latest colima. Of course using |
But in previous version (v0.5.4) everything work correctly. I think something changed in v0.5.5. Additionally, container does not restart during this error. |
Did you update your OS recently as well, or can you reproduce that in 0.5.4 everything is (still) fine? There have been some Mac OS updates which affected Lima network connectivity, but it might be something quite different. |
I did not update major version of Mac OS recently. I updated dependencies only using Homebrew. So, there is only one diff between prev state of my system and current state - is new version of colima, and other related dependecncies. |
found similar issue - docker/compose#10673 |
I had a similar issue on an M2 MacBook Air - maybe this helps someone: I had a test suite running on macOS, connecting to services running in Docker via colima. The test suite wasn't shutting down connections to the services properly, so more and more connections accumulated with each test, ending up at > 300 connections (according to Roughly at that point, always after the exact same number of tests, no matter if I disabled some (so probably after the same amount of connections was open and not related individual tests), networking to the Docker services broke down until the test process was finished and the OS closed all connections. Networking broke (even existing connections were closed) both via gvproxy and slirp networking, both to an arm64 and an x86 VM (emulated via qemu). After fixing connection shutdown in the test suite, everything runs fine now. So there seems to be some kind of connection limit around 300 connections, where some component used by colima breaks down. I couldn't find anything in kernel logs like OOM or networking issues, not in Docker logs, nor were the containers restarting. |
I think I'm hitting the same limit @mfrister mentioned... In my case, it's not a connection leak, but an application with a lot of kafka consumers connecting to multiple kafka instances with docker compose. I can access a redpanda instance with HTTP before my service starts, and after my service quits, but not while consumers are up. A similar setup in another service but with less consumers (and therefore less connections) works fine. Perhaps some limit on port forwarding in ssh? |
More details: 2019 Intel MacBook Pro, MacOS Ventura 13.5.2 (22G91) Problem happened with ~ 260 sockets in ssh process, including listening sockets. |
This is still very much an issue. I'm running the latest Colima v0.6.8 , Mac air m1 using vz vm (macOS 13). This also happens on qemu vm. For me the at above around 240 connections to my container the connections start to break down and existing connections to my container also break at this point (e.g VisualVM disconnects from the java process). Spent ages tuning my test but it's a fairly simple suite. In my tests I see a bunch of "connection reset by peer" and "dial error". I'm using k6 and it seems to create a connection for each virtual user and so even if I ask for a rate of 1 request per second this issue still happens because I can configure the test suite to lets say start with 250 virtual users and so it will try and create those connections to the container and will fail to keep them connected. I observed no issues when running my java process without using a container |
Fascinating realisation! this happens because of using localhost/127.0.0.1 vs the ip assigned to the Colima vm (needs enabling). When using the ip of the vm it works just fine |
@smiklos it's really work for me! Previously my requests to the service could reach 5 seconds, in the course of debug I found out that the request to the database takes very long, and when I changed the database host to ip colima ip everything started to work perfectly |
* build: Lock GitHub runners' OS This was motivated by our macOS jobs failing [2] because colima is missing. It looks like this is because the latest versions of the macOS runner no longer have colima installed by default [1]. colima is now explicitly installed. [1] actions/runner-images#6216 [2] `/Users/runner/work/_temp/f19ffbff-27a9-4fc7-80b6-97791d2de141.sh: line 9: colima: command not found` * build: Lock Colima * build: Move macOS Docker installation to script * build: Move macOS libomp activation to script * build: Use latest Colima The > 0.6.0 releases actually fix the issue we have linked [1][2][3]. [1] abiosoft/colima#577 [2] https://github.com/jesse-c/MLServer/blob/c3acd60995a72141027eff506e4fd330fe824179/hack/install-docker-macos.sh#L18-L20 [3] > Switch to new user-v2 network. Fixes abiosoft/colima#648, abiosoft/colima#603, abiosoft/colima#577, abiosoft/colima#779, abiosoft/colima#137, abiosoft/colima#740.
Description
After update colima to v0.5.5 I have some troubles with my services started by docker-compose. For example I try to connect to postgres in a container. With etcd container the same.
This behaviour has no any pattern. At least one try from 10 works correctly. After downgrading colima to 0.5.4 everything is ok.
Version
Colima Version: 0.5.5
Lima Version: 0.16.0
Qemu Version: 8.0.2
Operating System
Output of
colima status
Reproduction Steps
Expected behaviour
postgres should work stable without any issues
Additional context
The text was updated successfully, but these errors were encountered: