3

私たちは時々これらのいくつかを取得します:

Caused by: javax.ejb.EJBException: org.jclouds.http.HttpResponseException: 
command: PUT {{PUT_URL}} 
HTTP/1.1 failed with response: HTTP/1.1 408 Request Timeout; 
content: [<html><h1>Request Timeout</h1><p>The server has waited too long for the request to be sent by the client.</p></html>]

後で再試行すると、通常は機能します。この例外の原因は何ですか? 迅速にタイムアウトを増やす方法はありますか?

4

2 に答える 2

1

jclouds 1.7.2 には、この問題に対する修正が含まれています。

https://issues.apache.org/jira/browse/JCLOUDS-342

于 2014-02-25T18:47:32.133 に答える
1

あなたの質問には、詳細な適切な情報がありません。

あなたが開発者であれば、次のようなものを使用できます。

import static org.jclouds.Constants.*;


  Properties overrides = new Properties();
  overrides.setProperty(PROPERTY_MAX_CONNECTIONS_PER_CONTEXT, 20 + "");
  overrides.setProperty(PROPERTY_MAX_CONNECTIONS_PER_HOST, 0 + "");
  overrides.setProperty(PROPERTY_CONNECTION_TIMEOUT, 5000 + "");
  overrides.setProperty(PROPERTY_SO_TIMEOUT, 5000 + "");
  overrides.setProperty(PROPERTY_IO_WORKER_THREADS, 20 + "");
  // unlimited user threads
  overrides.setProperty(PROPERTY_USER_THREADS, 0 + "");


  Set<Module> wiring =  ImmutableSet.of(new EnterpriseConfigurationModule(), new Log4JLoggingModule());

  // same properties and wiring can be used for many services, although the limits are per context
  blobStoreContext = ContextBuilder.newBuilder("s3")
                      .credentials(account, key)
                      .modules(wiring)
                      .overrides(overrides)
                      .buildView(BlobStoreContext.class);
  computeContext = ContextBuilder.newBuilder("ec2")
                      .credentials(account, key)
                      .modules(wiring)
                      .overrides(overrides)
                      .buildView(ComputeServiceContext.class);

以下は、JClouds Configuration docsからの引用です。

Timeout : FutureIterables.awaitCompletion によって制御されるように、集約コマンドは完了するまでに必要なだけ時間がかかります。これを増減する必要がある場合は、プロパティ jclouds.request-timeout または Constants.PROPERTY_REQUEST_TIMEOUT を調整する必要があります。これについては、「高度な構成」セクションで説明されています。

独自のクラスターを扱っている場合は、swift proxy-server-configurationにあるいくつかの可能な構成オプションを使用できます。

于 2013-12-04T12:45:48.000 に答える