diff --git a/cmd/bucket-quota.go b/cmd/bucket-quota.go index 1b7d6e6db..6a9307f83 100644 --- a/cmd/bucket-quota.go +++ b/cmd/bucket-quota.go @@ -71,6 +71,8 @@ func (sys *BucketQuotaSys) check(ctx context.Context, bucket string, size int64) sys.bucketStorageCache.Once.Do(func() { sys.bucketStorageCache.TTL = 1 * time.Second sys.bucketStorageCache.Update = func() (interface{}, error) { + ctx, done := context.WithTimeout(context.Background(), 5*time.Second) + defer done() return loadDataUsageFromBackend(ctx, objAPI) } })