]> source.dussan.org Git - gitblit.git/commitdiff
Adds the
authorSebastiano Pilla <sebastiano@sebastianopilla.com>
Wed, 31 May 2017 22:07:45 +0000 (00:07 +0200)
committerSebastiano Pilla <sebastiano@sebastianopilla.com>
Wed, 31 May 2017 22:07:45 +0000 (00:07 +0200)
server.httpTimeout

setting to allow cloning big repositories over HTTP. This change fixes the java.util.concurrent.TimeoutException issue described in https://groups.google.com/d/topic/gitblit/UvDC48NpmF4/discussion .

src/main/distrib/data/defaults.properties
src/main/java/com/gitblit/GitBlitServer.java

index 51fa1253ab25d4d880fa28cc5d12a27ffd291820..e253064094ecb658a5f74d48fb01ce62f12f6938 100644 (file)
@@ -2134,6 +2134,13 @@ server.requireClientCertificates = false
 # RESTART REQUIRED
 server.shutdownPort = 8081
 
+# Timeout (in milliseconds) for http and https requests
+# Increase this value if you get java.util.concurrent.TimeoutException errors
+#
+# SINCE 1.9.0
+# RESTART REQUIRED
+server.httpTimeout = 30000
+
 #
 # Gitblit Filestore Settings
 #
index 6123a872d9adaad0ffeb72cf3ea14289888f1643..731ca8e5a8f548018221c12f055400d6ec2760eb 100644 (file)
@@ -293,7 +293,7 @@ public class GitBlitServer {
 
                                ServerConnector connector = new ServerConnector(server, factory);
                                connector.setSoLingerTime(-1);
-                               connector.setIdleTimeout(30000);
+                               connector.setIdleTimeout(settings.getLong(Keys.server.httpTimeout, 30000L));
                                connector.setPort(params.securePort);
                                String bindInterface = settings.getString(Keys.server.httpsBindInterface, null);
                                if (!StringUtils.isEmpty(bindInterface)) {
@@ -330,7 +330,7 @@ public class GitBlitServer {
 
                        ServerConnector connector = new ServerConnector(server, new HttpConnectionFactory(httpConfig));
                        connector.setSoLingerTime(-1);
-                       connector.setIdleTimeout(30000);
+                       connector.setIdleTimeout(settings.getLong(Keys.server.httpTimeout, 30000L));
                        connector.setPort(params.port);
                        String bindInterface = settings.getString(Keys.server.httpBindInterface, null);
                        if (!StringUtils.isEmpty(bindInterface)) {
@@ -608,4 +608,4 @@ public class GitBlitServer {
                public String ldapLdifFile;
 
        }
-}
\ No newline at end of file
+}