Allow graceful rolling restarts

Set a graceful stop timeout for allowing Jetty to wait for incoming
requests to be completed before shutting down its sockets.

This change is mandatory for all of those who are using Gerrit behind
a HAProxy server and want to have rolling restarts that are completely
transparent to the end user.

Change-Id: I5fec738db70df8de963b2ad4701aa394a9209f38
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index ce4bbd4..f053809 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -2408,6 +2408,21 @@
 +
 By default, true.
 
+[[httpd.gracefulStopTimeout]]httpd.gracefulStopTimeout::
++
+Set a graceful stop time. If set, the daemon ensures that all incoming
+calls are preserved for a maximum period of time, before starting
+the graceful shutdown process. Sites behind a workload balancer such as
+HAProxy would need this to be set for avoiding serving errors during
+rolling restarts.
++
+Values should use common unit suffixes to express their setting:
++
+* s, sec, second, seconds
+* m, min, minute, minutes
++
+By default, 0 seconds (immediate shutdown).
+
 [[httpd.inheritChannel]]httpd.inheritChannel::
 +
 If true, permits the daemon to inherit its server socket channel