summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorSebastiano Pilla <sebastiano@sebastianopilla.com>2017-06-01 00:07:45 +0200
committerSebastiano Pilla <sebastiano@sebastianopilla.com>2017-06-01 00:07:45 +0200
commitac94c2c0c4dbcda4a6641ad16d9ece20258a10f4 (patch)
treedb5a04ae42e517c713a27122afe99da772a53b52 /src/main
parentc1d816da6e91037741a47fcd79458fe658a45b1d (diff)
downloadgitblit-ac94c2c0c4dbcda4a6641ad16d9ece20258a10f4.tar.gz
gitblit-ac94c2c0c4dbcda4a6641ad16d9ece20258a10f4.zip
Adds the
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 .
Diffstat (limited to 'src/main')
-rw-r--r--src/main/distrib/data/defaults.properties7
-rw-r--r--src/main/java/com/gitblit/GitBlitServer.java6
2 files changed, 10 insertions, 3 deletions
diff --git a/src/main/distrib/data/defaults.properties b/src/main/distrib/data/defaults.properties
index 51fa1253..e2530640 100644
--- a/src/main/distrib/data/defaults.properties
+++ b/src/main/distrib/data/defaults.properties
@@ -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
#
diff --git a/src/main/java/com/gitblit/GitBlitServer.java b/src/main/java/com/gitblit/GitBlitServer.java
index 6123a872..731ca8e5 100644
--- a/src/main/java/com/gitblit/GitBlitServer.java
+++ b/src/main/java/com/gitblit/GitBlitServer.java
@@ -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
+}