mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-5843
For some reason the mgmt server is required to have access to the template being registered in order to check its size against resource limits during registration. This is bad, but worse, it's a sync call, so this call can hang for up to the default HTTP connection timeout. Reducing http timeout as a quick workaround, but this check needs to 1) be removed or 2) done later or 3)registerTemplate needs to be async and 4) moved off the mgmt server (ssvm is the only thing that needs access to template url).
This commit is contained in:
parent
5adc778d88
commit
effa4c75b4
@ -147,6 +147,8 @@ public class UriUtils {
|
||||
URI uri = new URI(url);
|
||||
if (uri.getScheme().equalsIgnoreCase("http")) {
|
||||
httpConn = (HttpURLConnection)uri.toURL().openConnection();
|
||||
httpConn.setConnectTimeout(2000);
|
||||
httpConn.setReadTimeout(5000);
|
||||
if (httpConn != null) {
|
||||
String contentLength = httpConn.getHeaderField("content-length");
|
||||
if (contentLength != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user