Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

harbor leak fd when connect to registry #836

Closed
feilengcui008 opened this issue Sep 23, 2016 · 3 comments
Closed

harbor leak fd when connect to registry #836

feilengcui008 opened this issue Sep 23, 2016 · 3 comments
Assignees
Labels

Comments

@feilengcui008
Copy link
Contributor

feilengcui008 commented Sep 23, 2016

If you are reporting a problem, please make sure the following information are provided:
1)Version of docker engine and docker-compose
Docker version:
Client:
Version: 1.12.1
API version: 1.24
Go version: go1.7.1
Git commit: 6f9534c
Built: Thu Sep 8 10:31:18 2016
OS/Arch: darwin/amd64
Server:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: 23cf638
Built: Thu Aug 18 17:52:38 2016
OS/Arch: linux/amd64

Compose version:
docker-compose version 1.8.0, build f3628c7

2)Harbor version: master branch

3)reproduce step
3.1 use docker-compose start the harbor in 127.0.0.1
3.2 push an image to library namespace
3.3 docker exec -it deploy_ui /bin/bash and watch fds in /proc/1/fd
3.4 login harbor ui and request project details http://127.0.0.1/repository#/repositories?project_id=1&is_public=1

4)phenomenon
the fds of harbor ui and registry will increase when you request the api related to tags and manifests, when reach the max default number of process 1024, then dns resolve will fail and new request will fail
2016-09-23 17 09 51

5)misc
the same to linux x86_64 platform
maybe related to pr547: #547

@reasonerjt reasonerjt self-assigned this Sep 23, 2016
@reasonerjt
Copy link
Contributor

reasonerjt commented Sep 29, 2016

I can re-produce the issue, reusing the transport in http client and setting Timeout fix this issue, but honestly I only see people suggesting such fix, but don't totally get why resp.Body.Close() is insufficient, as we'll release a new version to include some bug fix this week I'll apply this fix for now.

Will dig more when I have time, this week's schedule is crazy...

@feilengcui008
Copy link
Contributor Author

@reasonerjt I think the essential reason is that the tarnsport is not reused. Each tarnsport will keep defaul 2 idle conns, if we create trasport every time, it will leak 2 fds for each request

@reasonerjt
Copy link
Contributor

I believe this has been fixed , closing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants