-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
Description
- Push a image to Harbor and create 2000 tags in this repo.
2.Try to get the tags
"https:///api/repositories/library/nginx-photon/tags" - The request is timeout with 504 error
This issue only ocurr in Harbor version <=1.10.x
It is because the https://github.com/goharbor/harbor/blob/d8336c45496f5139321b08d7a406271185312fa7/src/core/api/repository.go#L654-L653, it send lots of request to the registry and registry need to connect redis to get the tag information. for each request, it needs to open a file, if it reaches the max open file per process, then the redis can not be connected, with the following error:
"error connecting to redis instance redis:6379"
It is not recommended to create tags > 1000 in a single repo when Harbor version <= 1.10.x
This issue can not be reproduced in Harbor 2.x because it doesn't query tags by http request.
abowloflrf