sregistry icon indicating copy to clipboard operation
sregistry copied to clipboard

sregistry limit questions

Open danmons opened this issue 5 years ago • 7 comments

I have a local sregistry running, and have the following config items:

# grep LIMIT shub/settings/config.py 
USER_COLLECTION_LIMIT = 0
CONTAINER_WEEKLY_GET_LIMIT = 99999
COLLECTION_WEEKLY_GET_LIMIT = 99999
SREGISTRY_GOOGLE_BUILD_LIMIT = 9999
VIEW_RATE_LIMIT = "999999/1d"
VIEW_RATE_LIMIT_BLOCK = ( False )

However when things get busy, get the following error from "singularity push" operations:

FATAL:   Unable to push image to library: request did not succeed: http status code: 429

A simple loop will have me limited in about 20 push requests over the course of 15-30 minutes. Restarting the sregistry docker container resets the limits.

This is a private facing registry for an internal user group, and I don't want to impose any limits on them at all. Is there a config item I've missed? I've attempted to set some of those values to "0" as well, with no luck (either the container won't start, or the problem doesn't go away).

danmons avatar Oct 28 '20 05:10 danmons

You could try setting RATELIMIT_ENABLE to False https://django-ratelimit.readthedocs.io/en/stable/settings.html#ratelimit-enable.

vsoch avatar Oct 28 '20 05:10 vsoch

Many thanks for the speedy reply. Unfortunately that didn't change anything for me.

My test loop simply pushes the same container over itself continuously with a 1 second sleep between pushes. Within 7-10 minutes and 15-20 containers pushed, the 429 error returns.

danmons avatar Oct 28 '20 05:10 danmons

Have you tried setting the limit to None, and block to False? And also make sure to reset containers and clear the cache you are using.

vsoch avatar Oct 28 '20 06:10 vsoch

Also, we should double check the version - as of 3.0.0 the RatelimitMixin is deprecated in favor of using method_decorator.

vsoch avatar Oct 28 '20 16:10 vsoch

heyo! Just checking in. Did setting to None have any luck?

vsoch avatar Oct 30 '20 01:10 vsoch

Hi,

The settings didn't take, but I haven't had a chance to update the containers yet. I have a window to make that change tomorrow, so I'll get back to you as soon as I've completed that.

danmons avatar Nov 01 '20 21:11 danmons

Sounds good! We would want to check:

  • the version of ratelimit
  • confirm that you've restarted the containers

And we might need to look into if the ratelimit module uses a cache or some database model to determine rules - it could be that you make a change and then it's not reflected because the database / cache still sees old requests.

vsoch avatar Nov 01 '20 21:11 vsoch