-
Bob Van Landuyt authored
This allows configuring Sidekiq job limits from the admin area, or using the API. Configuration options are: **Limiter mode*** `sidekiq_job_limiter_mode`, this can either be `track` (0), or `compress` (1). In `track` mode, this will only report errors when the arguments for jobs exceed the `sidekiq_job_limiter_limit_bytes` option. But no jobs will be compressed or rejected. In `compress` mode, the jobs will be compressed before they are stored in Redis. If a job's arguments would still exceed `sidekiq_job_limiter_limit_bytes` after compression an exception would be raised and the job would not be stored in Redis. Setting the `sidekiq_job_limit_bytes` to 0 avoids raising an error. Jobs will get compressed or rejected when they are scheduled. Default is `compress`. **Compression threshold bytes** When the job's arguments exceed this size, the job's arguments will be compressed before storing them in Redis. Below this size, nothing will happen. Default is 100Kb. **Size limit** When jobs exceed this size after compression, an exception will be raised preventing the jobs from being stored in redis. Default is 0 bytes. The defaults will enable job-compression without limiting for self-managed installations. Compression has been running on GitLab.com. On GitLab.com we're rejecting jobs exceeding 5MB after compression. The validation is entirely skipped for BackgroundMigrations, since the scheduling of those cannot depend on the state of the schema. So we cannot load the settings into memory to run the clientside validation. Changelog: added
186465da