【问题标题】:[Amazon](600000) Error setting/closing connection: Connection reset by peer. [SQL State=HY000, DB Errorcode=600000][Amazon](600000) Error setting/closing connection: Connection reset by peer. [SQL State=HY000, DB Errorcode=600000]
【发布时间】:2017-07-07 09:58:24
【问题描述】:

尝试将大型 TPCH 表数据从 S3 复制到我的 AWS RDS 实例时,我收到以下错误:

An error occurred when executing the SQL command:
copy orders from 's3://aqa-pat/tpchData/tpchRawData/100G/orders.tbl'
credentials 'aws_iam_role=arn:aws:iam::183326689449:role/RedshiftRole'
delimiter ...

[Amazon](600000) Error setting/closing connection: Connection reset by peer. [SQL State=HY000, DB Errorcode=600000] 
1 statement failed.

Execution time: 15m 3s

我正在运行 TPCH 基准测试并使用 TPC 的 dbgen 工具创建了单独的表文件,并且仅在上传订单和 lineitems 表时收到此连接错误。其他表已加载。

我应该怎么做才能解决这个问题?将我的实例的区域更改为 S3 存储桶的区域?

【问题讨论】:

  • "Execution time: 15m 3s" - 如果你正在运行一个需要很长时间的 SQL 命令,那么你做错了什么。找到另一种实现方式,例如分片。

标签: amazon-web-services amazon-s3 amazon-redshift


【解决方案1】:

为了清楚起见,我将 100GB 的数据加载到一个表中。我认为 RedShift 能够处理这种负载。但恢复为分片。

我已经通过按照 AWS 文档将我的表分区为 JSON 清单解决了这个问题。

清单如下所示:

Copy
{
  "entries": [
    {"url":"s3://mybucket-alpha/2013-10-04-custdata", "mandatory":true},
    {"url":"s3://mybucket-alpha/2013-10-05-custdata", "mandatory":true},
    {"url":"s3://mybucket-beta/2013-10-04-custdata", "mandatory":true},
    {"url":"s3://mybucket-beta/2013-10-05-custdata", "mandatory":true}
  ]
}

以下是将上述清单导入redshift的方法:

copy customer
from 's3://mybucket/cust.manifest' 
iam_role 'arn:aws:iam::0123456789012:role/MyRedshiftRole'
manifest;

以下是其他有类似问题的人的文档:

http://docs.aws.amazon.com/redshift/latest/dg/loading-data-files-using-manifest.html

【讨论】:

    猜你喜欢
    • 2019-03-29
    • 1970-01-01
    • 2019-02-02
    • 2020-05-15
    • 1970-01-01
    • 2018-10-15
    • 2012-01-18
    • 1970-01-01
    • 2019-04-30
    相关资源
    最近更新 更多