175
`maintenance.<task>.enabled` configured as `true` are considered.
176
See the 'TASKS' section for the list of accepted `<task>` values.
177
178
+
179
+TROUBLESHOOTING
180
+---------------
181
+The `git maintenance` command is designed to simplify the repository
182
+maintenance patterns while minimizing user wait time during Git commands.
183
+A variety of configuration options are available to allow customizing this
184
+process. The default maintenance options focus on operations that complete
185
+quickly, even on large repositories.
186
+
187
+Users may find some cases where scheduled maintenance tasks do not run as
188
+frequently as intended. Each `git maintenance run` command takes a lock on
189
+the repository's object database, and this prevents other concurrent
190
+`git maintenance run` commands from running on the same repository. Without
191
+this safeguard, competing processes could leave the repository in an
192
+unpredictable state.
193
+
194
+The background maintenance schedule runs `git maintenance run` processes
195
+on an hourly basis. Each run executes the "hourly" tasks. At midnight,
196
+that process also executes the "daily" tasks. At midnight on the first day
197
+of the week, that process also executes the "weekly" tasks. A single
198
+process iterates over each registered repository, performing the scheduled
199
+tasks for that frequency. Depending on the number of registered
200
+repositories and their sizes, this process may take longer than an hour.
201
+In this case, multiple `git maintenance run` commands may run on the same
202
+repository at the same time, colliding on the object database lock. This
203
+results in one of the two tasks not running.
204
+
205
+If you find that some maintenance windows are taking longer than one hour
206
+to complete, then consider reducing the complexity of your maintenance
207
+tasks. For example, the `gc` task is much slower than the
208
+`incremental-repack` task. However, this comes at a cost of a slightly
209
+larger object database. Consider moving more expensive tasks to be run
210
+less frequently.
211
+
212
+Expert users may consider scheduling their own maintenance tasks using a
213
+different schedule than is available through `git maintenance start` and
214
+Git configuration options. These users should be aware of the object
215
+database lock and how concurrent `git maintenance run` commands behave.
216
+Further, the `git gc` command should not be combined with
217
+`git maintenance run` commands. `git gc` modifies the object database
218
+but does not take the lock in the same way as `git maintenance run`. If
219
+possible, use `git maintenance run --task=gc` instead of `git gc`.
220
+
221
+
222
GIT
223
---
224
Part of the linkgit:git[1] suite