Excessive calls to '/events' api if docker daemon is not fully initialized

Open
#269 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, go
Domain
devops

Research direction

Start by reproducing dockergen's behavior while the Docker daemon is still initializing, then trace the code that requests the Docker /events API. Done means the request rate no longer spikes during initialization and memory usage remains near the expected level.

Written by the indexing model from the issue text.

Description

We have observed that dockergen calls '/events' huge number of times when the docker daemon is not fully initialized. As a result of this docker 1.9.1 consumes a lot of memory more than 4GB (when it should only be consuming 40MB).

Sample logs:

Jan 03 22:17:56 host docker[966]: time="2018-01-03T22:17:56.527161876+11:00" level=info msg="GET /events"
Jan 03 22:17:56 host docker[966]: time="2018-01-03T22:17:56.527770917+11:00" level=info msg="GET /events"
Jan 03 22:17:56 host docker[966]: time="2018-01-03T22:17:56.529030241+11:00" level=info msg="GET /events"
Jan 03 22:17:56 host docker[966]: time="2018-01-03T22:17:56.529666130+11:00" level=info msg="GET /events"

Number of times called per second:
Table shows columns timestamp and number of times '/events' called'.

22:17:56   571
22:17:57   1072
22:17:58   571
22:18:10   813
22:18:11    880
22:18:12    534
22:18:40   587
22:18:41    711
22:18:42    938
22:19:12   200
22:19:13   1586
22:19:14   463
Dominant language
Go
Stars
4.6k
Forks
609
Avg merge
2d 18h
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nginx-proxy/docker-gen

All issues in nginx-proxy/docker-gen

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.