Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
openstack swift:服务器等待客户端发送请求的时间太长_Openstack_Rackspace Cloud_Openstack Swift_Cloudfiles_Jclouds - Fatal编程技术网

openstack swift:服务器等待客户端发送请求的时间太长

openstack swift:服务器等待客户端发送请求的时间太长,openstack,rackspace-cloud,openstack-swift,cloudfiles,jclouds,Openstack,Rackspace Cloud,Openstack Swift,Cloudfiles,Jclouds,我们时不时会收到一些这样的信息: 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>Th

我们时不时会收到一些这样的信息:

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>]
原因:javax.ejb.EJBException:org.jclouds.http.HttpResponseException:
命令:PUT{{PUT_URL}}
HTTP/1.1失败,响应为:HTTP/1.1 408请求超时;
内容:[请求超时服务器等待客户端发送请求的时间过长。

]

稍后重试通常有效。是什么导致了这种异常?有没有办法增加swift的超时时间?

您的问题没有正确的详细信息

如果您是开发人员,您可以使用以下内容:

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);
导入静态org.jclouds.Constants.*;
属性覆盖=新属性();
overrides.setProperty(PROPERTY_MAX_CONNECTIONS_PER_CONTEXT,20+“”);
overrides.setProperty(每个主机的属性\u MAX\u CONNECTIONS\u,0+“”);
overrides.setProperty(属性\连接\超时,5000+“”);
overrides.setProperty(PROPERTY_SO_TIMEOUT,5000+“”);
overrides.setProperty(PROPERTY_IO_WORKER_THREADS,20+“”);
//无限用户线程
重写.setProperty(属性\用户\线程,0+“”);
设置wiring=ImmutableSet.of(新的EnterpriseConfigurationModule(),新的Log4JLoggingModule());
//相同的属性和连接可用于许多服务,尽管限制是根据上下文确定的
blobStoreContext=ContextBuilder.newBuilder(“s3”)
.凭据(帐户、密钥)
.模块(接线)
.覆盖(覆盖)
.buildView(BlobStoreContext.class);
computeContext=ContextBuilder.newBuilder(“ec2”)
.凭据(帐户、密钥)
.模块(接线)
.覆盖(覆盖)
.buildView(ComputeServiceContext.class);
以下引述自:

超时: 聚合命令将花费必要的时间来完成,由FutureIterables.awaitCompletion控制。 如果需要增加或减少此值,则需要调整属性jclouds.request-timeout或Constants.property\u request\u timeout。 这将在“高级配置”部分中描述


如果您正在处理自己的群集,则可以使用swift中提供的一些可能的配置选项。

jclouds 1.7.2包含了此问题的修复程序: