-
Notifications
You must be signed in to change notification settings - Fork 321
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
Infinite load for a specific container #3385
Comments
I reviewed the differences between versions 7.0.4 and 7.0.5 at v7.0.4...v7.0.5. One thing stood out: in version 7.0.5, I follow containers and only stream logs since the container started. This change prevents old logs from appearing when containers are restarted. I doubt this is the source of the problem. I need a way to reproduce this issue on my end.
I can't think of anything else. |
is not a vanilla nginx is the one embedded in the frontend of this stack: https://github.com/penpot/penpot/blob/develop/docker/images/docker-compose.yaml runned via portainer and with restart: unless-stopped instead of always
|
I am stumped on this one. Seems like your frontend container is based off Not sure what can be done to debug. Maybe completely destroy the container and recreate it. |
i've recreated the container and the bug (but also older logs :D) disappeared, so actually i have no way to replicate we don't know the culprit but maybe we can just close this isse.... |
i reuse this issue but i'm not sure this is the same bug ... today with 8.8.0 i was trying to see log of a specific container but figured out that it was searching for logs of wrong-destroyed container id: i got my container id e9fbd40f2b29 running than deployed a new image via portainer, so the container e9fbd40f2b29 got stopped and restarted with a new id 20c05b0abb96, dozzle did not switched to the new container and also after refreshing the page/clearing cache looks like was still seeing the old id e9fbd40f2b29 as running (but with no logs) each click on the container in the sidebar result in dozzle logs says that the containerid was not found but in the webpage the "Container not found" message did not show (was just loading a few sec than shows no log, not the same as if you put a non-existent id in the URL) recreating the container did not help this time, instead restarting dozzle container fixed the issue.... is there some sort of cache somewhere? |
Hey @FrancYescO, I haven't seen this issue personally. Someone else created it a while back, but I can't find it right now. I'll need your help to debug. If I can't reproduce the issue, it will be difficult to fix. Yes, Dozzle has an internal "store" that caches and stores all statistics for containers. It usually works well. I listen for specific Docker events to update the internal store. It seems like there might be an issue with Portainer, as the other case I remember was similar. Can you try to reproduce this state again? If you can consistently get into this state, it would be helpful to enable Most likely, some unusual event is occurring, and Dozzle isn't refreshing its own store. Thanks! |
i'll keep an eye on it to find a way to easily reproduce... surely i can say that seems is the first time i've seen the issue and my deployment was ever done in the same way
at what events are you listening for destroy and recreate? ... maybe there is some edge-case event the is getting ignored |
Dozzle listens to start, destroy, die, rename and few other ones. You can find it at dozzle/internal/docker/container_store.go Lines 180 to 234 in 7ccc312
|
Btw just happened again... I'll keep trying to isolate the issue but pretty sure is something with portainer webhook redeploy (or recreate?) methods |
i'm not 100% sure but this should be an extract during that bug happend .. maybe we miss kill? or the rename after kill-stop-die-destroy do some magic ?
|
Hmmm.... I don't see anything wrong here. I see two containers. The one starting
And then other container:
One thing you can do is run with Perhaps compare those with |
It happened 2times during a stack update via portainer webhook (you should register at least a free account for the business edition) But this happens various time during the day and all keeps working correctly so I'm still not able to find an easy replicable path... |
I wonder if this is a race issue, as it occurs sometimes but not always.
|
|
I see. So wrong id, correct name. I didn't realize this is part of a stack. I can try it out. |
@FrancYescO, is dozzle part of your stack, or is it always running separately, and the stack is updated independently? |
I have various stack, and dozzle is part of another stack |
@FrancYescO, no luck. I set up Portainer Community Edition and created a new stack like this:
Everything was working well in Dozzle. I redeployed the stack by changing I wonder if the issue is related to the webhooks. Unfortunately, that's beyond the time I have available. I can't seem to reproduce it easily. If you find a reliable way to reproduce it without setting up the entire pipeline, that would be helpful. |
in my case the image, have ever the same "latest" tag.... but i don't think that matter... this happened 2 time more today (while the stack was probably redeployed with no dozzle issue 20+ more), but i was still not tracing the events properly i'll update here if i find something more |
Ah what surely I should say is that during the portainer redeploy you will NEVER be redirected to the new container (but this can be a different issue related to #3036 ) |
Here we are again, and now i'm sure, here a result of the dozzle filtered log e4c57f33f6d8 > container that remain orphaned after the stack update "Error response from daemon: No such container: e4c57f33f6d8" is me clicking on the cointainer in the sidebar and getting no logs... looks dozzle never received events from c8cabeb803ed, the only thing i see before the Dozzle restart is "starting to stream stats"...
|
Can you attach the whole logs? I am looking for other errors such as "docker store unexpectedly disconnected from docker events". It doesn't make sense why there is a bunch of "received container event" events and then suddenly they stop. |
OK it's not what I thought. But I have a wild guess. Give me a little time. Let me check something and provide a PR. |
#3417 I am just taking a guess here. I noticed that after I don't know why it would be but this would be a fix. Can you try |
ok i'll leave this pr running, i'll update if happens again... |
If it works, it will make me go crazy why. Because currently, it shouldn't block. By the way, how many people are using Dozzle in a browser? Is it just you or is it a few? |
few, but often non-concurrent |
Hmm, okay. That could explain what I am seeing. I'll add more debugging logs later. If my intuition is correct, a deadlock occurs after a new container is found because multiple sessions are trying to write to a channel. |
I am guessing that didn't solve your problem. I didn't realize you had originally It's crazy that I don't see |
Alright, I think we need to do some deeper investigation. I have enabled stack trace dump in #3418. You can deploy with Next time this happens, go to Let me know! |
π Check for existing issues
How is Dozzle deployed?
Standalone Deployment
π¦ Dozzle version
8.7.5
β Command used to run Dozzle
as doc
π Describe the bug / provide steps to reproduce it
i have a specific container that does not load logs, is like the same infinite load as if you set a log filter that have no result, or if a container have a 0b of logs (can we fix also these 2cases and get the loading bar instead of spinner if /stream endpoint connection is fullfilled? :D)... but in this case the logs are populated just the /stream api returns empty
going backward with versions i noticed the bug popups in >=v7.0.5 while v7.0.4 correctly loads the logs of this container
for reference is what i posted here #3222 (comment)
all other container on the same host shows no issue, so i assume is something in the content of logs that breaks things, (is a pretty standard nginx log output)... this is how it ends actually:
π» Environment
πΈ If applicable, add screenshots to help explain your bug
No response
π If applicable, attach your Dozzle logs. You many need to enable debug mode. See https://dozzle.dev/guide/debugging.
No response
The text was updated successfully, but these errors were encountered: