Skip to content
代码片段 群组 项目
该项目从 https://gitlab.com/gitlab-org/gitlab.git 镜像。 拉取镜像更新于
  1. 5月 09, 2022
    • Matthias Käppler's avatar
      Address several edge cases in ProcessSupervisor · 625e38e0
      Matthias Käppler 创作于
      Fixed:
      - Do not determine `alive` status from the pidset returned
        by caller, since this can lead to "bouncing" state.
      - Swap loop-check with sleep call, since sleep suspends
        the calling thread, which may lead to the callback
        being invoked if `alive` is invalidated by another
        thread.
      - Do not trap INT and TERM by default; this was swallowing
        these signals for the Puma master.
      
      Changelog: fixed
      625e38e0
  2. 4月 25, 2022
    • Matthias Kaeppler's avatar
      Integrate Golang metrics server with Puma · 906d53f5
      Matthias Kaeppler 创作于
      This change:
      
      - Adds a rake task to install gitlab-metrics-exporter
        into a given directory.
      - Allows to run it in place of the existing Ruby based
        exporters; this is guarded by an environment variable.
      - Extends the existing end-to-end test to test both
        Ruby and Go implementations.
      906d53f5
  3. 3月 28, 2022
  4. 3月 25, 2022
    • Matthias Käppler's avatar
      Fix missing metrics for Sidekiq exporter server · 0e77c181
      Matthias Käppler 创作于
      We were accidentally deleting metrics the exporter
      server exported about itself. Actual sidekiq worker
      metrics were not affected.
      
      This happened because we would wipe the metrics dir
      whenever sidekiq_0 starts up, but this happens after
      the metrics server starts, so the worker was deleting
      those existing metrics.
      
      Changelog: fixed
      0e77c181
  5. 3月 17, 2022
  6. 3月 15, 2022
  7. 2月 21, 2022
  8. 2月 15, 2022
  9. 1月 04, 2022
  10. 12月 16, 2021
  11. 12月 08, 2021
  12. 11月 17, 2021
  13. 11月 08, 2021
  14. 9月 01, 2021
    • Sean McGivern's avatar
      Error on newlines in sidekiq-cluster arguments · 91e7b17c
      Sean McGivern 创作于
      When using Helm charts, which are YAML files, it's relatively easy to
      accidentally include a newline in the Sidekiq arguments. This will
      typically be a trailing newline, which shouldn't be a problem, except
      that in our cloud-native deployment we launch Sidekiq using the command
      given by `sidekiq-cluster --dryrun` (to avoid having the wrapper
      process), so we effectively do:
      
          $(bin/sidekiq-cluster --dryrun $ARGS)
      
      Ruby's `Shellwords.escape` quotes newlines as `'\n'`:
      https://github.com/ruby/shellwords/blob/v0.1.0/lib/shellwords.rb#L161-L163
      
      When those are parsed back in the arguments array we get `foo'\n'` for
      an original argument of `foo\n`. Then, when we apply splitting, we get
      `foo'` and `'` as two separate arguments.
      
      The quoting here is quite complicated but the below demonstrates (in
      Bash) what's happening:
      
          $ ruby -e 'p ARGV; p ARGV.first.split' "foo'"$'\n'"'"
          ["foo'\n'"]
          ["foo'", "'"]
      
      If we did care about newlines in this argument array, the solution would
      be more involved. But we don't, because they are never valid, so we can
      just error when we encounter them.
      
      Changelog: fixed
      91e7b17c
  15. 7月 29, 2021
    • Sean McGivern's avatar
      Add --list-queues option to sidekiq-cluster · c591bf77
      Sean McGivern 创作于
      The --dryrun option shows the full command sidekiq-cluster will run.
      This new option just lists the matched queues (mostly useful in
      conjunction with --queue-selector), one per line.
      c591bf77
  16. 6月 08, 2021
  17. 5月 27, 2021
  18. 4月 19, 2021
  19. 11月 03, 2020
  20. 4月 08, 2020
  21. 3月 24, 2020
    • Oswaldo Ferreira's avatar
      Support graceful timeout for Sidekiq Cluster processes · 887cab1a
      Oswaldo Ferreira 创作于
      Considering we're moving towards using Sidekiq Cluster
      only and customers using Omnibus are allowed to configure
      a Sidekiq timeout through -t flag, here we support a
      -t flag for `bin/sidekiq-cluster`.
      
      Here's how it works:
      
      Internally, we'll pass the given value to Sidekiq (`-t`) flag.
      For whatever value given, Sidekiq Cluster will wait for 5
      extra seconds in order to hard stop all remaining alive processes.
      
      So for instance, if `10` is given, Sidekiq will try to gracefully
      terminate within this time. If it gets stuck for some reason, the
      processes will be sigkilled within `15` seconds (total wait time).
      887cab1a
  22. 3月 20, 2020
  23. 3月 11, 2020
  24. 3月 06, 2020
    • Sean McGivern's avatar
      Allow selecting all queues with sidekiq-cluster · d1af35d2
      Sean McGivern 创作于
      Because it was designed for selecting specific queues, sidekiq-cluster
      didn't have a convenient method to select all queues. As we want this to
      become the default sidekiq entry point for all GitLab installations, and
      the default is to handle all queues in a single process, we need that
      option.
      
      (This was possible before: using `--experimental-queue-selector`, you
      could ask for something like `has_external_dependencies=true,false`, but
      that's not obvious.)
      
      Instead of making `*` a wildcard anywhere, which would be more general,
      this commit just allows a single `*` in a queue group to represent all
      queues. While this is less general, it's also simpler to implement, and
      we can assume that YAGNI for the wildcards.
      d1af35d2
  25. 3月 05, 2020
    • Stan Hu's avatar
      Defer loading of Sidekiq JSON formatter · 453fc3e6
      Stan Hu 创作于
      This avoids the error messages caused by loading
      `Sidekiq::JSONFormatter` twice:
      
      warning: already initialized constant
      Gitlab::SidekiqLogging::JSONFormatter::TIMESTAMP_FIELDS
      453fc3e6
  26. 3月 04, 2020
  27. 2月 13, 2020
  28. 1月 22, 2020
    • Sean McGivern's avatar
      Add --min-concurrency to sidekiq-cluster · 8e6c0c0e
      Sean McGivern 创作于
      Allow setting a minimum concurrency for sidekiq-cluster, as well as the
      existing maximum. These can be set to the same value to enforce
      concurrency at a particular number of threads, regardless of the number
      of queues in the group.
      8e6c0c0e
  29. 1月 15, 2020
    • Sean McGivern's avatar
      Move SidekiqConfig methods used by CLI to own module · 4484de15
      Sean McGivern 创作于
      These methods can't use any Rails dependencies, which also means the
      SidekiqConfig module definition - i.e. constants - can't use Rails
      dependencies either.
      
      Move those methods to their own module to make this clearer. Also switch
      to defining methods on the singleton class in both modules to make
      private methods more convenient.
      4484de15
  30. 1月 09, 2020
  31. 10月 22, 2019
    • Matthias Käppler's avatar
      More fine-grained metrics for sidekiq workers · 73b14405
      Matthias Käppler 创作于
      We currently only measure the global (node-level) business in terms
      of jobs being processed. We would instead like to be able to know
      for each sidekiq process how saturated it is in terms of actual
      concurrency vs requested/max concurrency.
      
      This patch does the following:
      
      - add a worker/process dimension to all existing metrics
      - introduce a new metric to observe concurrency per process
      
      by relating "actual job count per process" to "max job count per
      process" we can then obtain some sort of saturation metric.
      73b14405
  32. 1月 08, 2019
  33. 8月 29, 2018
    • Stan Hu's avatar
      Limit sidekiq-cluster concurrency to a maximum of 50 by default · 73218620
      Stan Hu 创作于
      By default, sidekiq-cluster will allocate N threads for N queues specified
      on the command line, which in turn will require N + 5 Redis connections.
      Especially when used with the `--negate` flag, this can lead to using hundreds
      of Redis connections, which can lead to performance issues.
      
      This change also adds a `-m N` option to cap the number of threads. For each
      queue group, the concurrency factor will be set to min(number of queues, N).
      
      Closes #7374
      73218620
  34. 1月 30, 2018
加载中