gpt4 book ai didi

amazon-web-services - AWS 存储网关 : refresh cache Too many requests have been sent to server

转载 作者:行者123 更新时间:2023-12-05 07:20:03 25 4
gpt4 key购买 nike

我猜我调用 AWS Storage Gateway refreshCache 方法的频率太高了(如消息所示),但我不确定我需要等多久才能再次点击它,我们将不胜感激。

AWSStorageGateway gatewayClient = AWSStorageGatewayClientBuilder.standard().build();
RefreshCacheRequest cacheRequest = new RefreshCacheRequest();
cacheRequest.setFileShareARN(this.fileShareArn);
gatewayClient.refreshCache(cacheRequest);

com.amazonaws.services.storagegateway.model.InvalidGatewayRequestException:已向服务器发送了太多请求。 (服务:AWSStorageGateway;状态代码:400;错误代码:InvalidGatewayRequestException;请求 ID:f1ffa249-6908-4ae1-9f71-93fe7f26b2af)在 com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1712)在 com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1367)在 com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1113)在 com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:770)

最佳答案

我想你可以引用官方文档。 https://docs.aws.amazon.com/storagegateway/latest/APIReference/API_RefreshCache.html

正如它所说,

When this API is called, it only initiates the refresh operation. When the API call completes and returns a success code, it doesn't necessarily mean that the file refresh has completed. You should use the refresh-complete notification to determine that the operation has completed before you check for new files on the gateway file share.

所以我猜想在您调用 AWS Storage Gateway refreshCache 方法之后,您必须等到刷新操作完成。如果在此期间再次调用该方法,则会引发一些异常。

解决方法可以引用Monitoring Your File Share设置通知。

关于amazon-web-services - AWS 存储网关 : refresh cache Too many requests have been sent to server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57632673/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com