lazydocker icon indicating copy to clipboard operation
lazydocker copied to clipboard

Loading large logs of a service takes forever

Open birgersp opened this issue 2 years ago • 3 comments

Describe the bug When selecting a Service to view a large log, loading of the log takes a very very long time. It sometimes takes several minutes to show anything.

In contrast, doing docker logs -t --tail 1500 mycontainer 2>&1 for the container of the service, takes about 1 second to print out all 1500 lines.

To Reproduce Steps to reproduce the behavior:

  1. Run a service that emits a million lines to the log
  2. Select the service
  3. Wait
  4. Growl, go to github.com/jesseduffield/lazydocker and file an issue

Expected behaviour Logs should load immidiately

birgersp avatar Feb 22 '23 07:02 birgersp

I just noticed that some services actually doens't load at all. I suspect the "refresh" interval time is shorter than the time it takes to load the log.

FWIW this is my ~/.config/lazydocker/config.yaml:

gui:
  returnImmediately: true
  expandFocusedSidePanel: true
logs:
  timestamps: true
  tail: 1000

birgersp avatar Feb 25 '23 09:02 birgersp

Also noticed that logs sometimes don't load at all. I have upgraded lazydocker to current version (0.23.1), no change. I can see the logs using docker logs <service> no problem.

EDIT: actually my problem was related to this issue: https://github.com/jesseduffield/lazydocker/issues/391

Because those were older containers which didn't print anything in the last hour. So when I set in config the logs: since: '', I can see all the logs.

Koshmaar avatar Dec 07 '23 13:12 Koshmaar

Can confirm that large logs aren't loading properly. I'm just using docker logs as a workaround for now. I have a container with a ~2GB file that logs pretty frequently and lazydocker just displays a blank screen.

ghost-458 avatar Jul 25 '24 17:07 ghost-458