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 39
39
workers { { PUMA_WORKERS } }
40
40
41
41
require_relative "{{GITLAB_INSTALL_DIR}}/lib/gitlab/cluster/lifecycle_events"
42
- require_relative "{{GITLAB_INSTALL_DIR}}/lib/gitlab/cluster/puma_worker_killer_initializer"
43
42
44
43
on_restart do
45
44
# Signal application hooks that we're about to restart
60
59
Gitlab ::Cluster ::LifecycleEvents . do_worker_start
61
60
end
62
61
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
+
63
67
# Preload the application before starting the workers; this conflicts with
64
68
# phased restart feature. (off by default)
65
69
preload_app !
72
76
#
73
77
worker_timeout { { PUMA_TIMEOUT } }
74
78
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
+
75
82
# Use json formatter
76
83
require_relative "{{GITLAB_INSTALL_DIR}}/lib/gitlab/puma_logging/json_formatter"
77
84
78
85
json_formatter = Gitlab ::PumaLogging ::JSONFormatter . new
79
86
log_formatter do |str |
80
87
json_formatter . call ( str )
81
88
end
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