File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
assets/runtime/config/gitlabhq Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 3939workers { { PUMA_WORKERS } }
4040
4141require_relative "{{GITLAB_INSTALL_DIR}}/lib/gitlab/cluster/lifecycle_events"
42- require_relative "{{GITLAB_INSTALL_DIR}}/lib/gitlab/cluster/puma_worker_killer_initializer"
4342
4443on_restart do
4544 # Signal application hooks that we're about to restart
6059 Gitlab ::Cluster ::LifecycleEvents . do_worker_start
6160end
6261
62+ on_worker_shutdown do
63+ # Signal application hooks that a worker is shutting down
64+ Gitlab ::Cluster ::LifecycleEvents . do_worker_stop
65+ end
66+
6367# Preload the application before starting the workers; this conflicts with
6468# phased restart feature. (off by default)
6569preload_app !
7276#
7377worker_timeout { { PUMA_TIMEOUT } }
7478
79+ # https://github.com/puma/puma/blob/master/5.0-Upgrade.md#lower-latency-better-throughput
80+ wait_for_less_busy_worker ENV . fetch ( 'PUMA_WAIT_FOR_LESS_BUSY_WORKER' , 0.001 ) . to_f
81+
7582# Use json formatter
7683require_relative "{{GITLAB_INSTALL_DIR}}/lib/gitlab/puma_logging/json_formatter"
7784
7885json_formatter = Gitlab ::PumaLogging ::JSONFormatter . new
7986log_formatter do |str |
8087 json_formatter . call ( str )
8188end
89+
90+ lowlevel_error_handler do |ex , env |
91+ if Raven . configuration . capture_allowed?
92+ Raven . capture_exception ( ex , tags : { 'handler' : 'puma_low_level' } , extra : { puma_env : env } )
93+ end
94+
95+ # note the below is just a Rack response
96+ [ 500 , { } , [ "An error has occurred and reported in the system's low-level error handler." ] ]
97+ end
You can’t perform that action at this time.
0 commit comments