微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

放大 JS API GraphQL Elasticsearch 抛出“ResolverExecutionLimitReached”错误

如何解决放大 JS API GraphQL Elasticsearch 抛出“ResolverExecutionLimitReached”错误

我已经使用 Vue 项目实现了 Amplify JS 库,并且除了这个问题之外,该库的所有功能都取得了成功。当我使用 Elasticsearch 查询模型时,它返回了相应的结果,但也返回了“ResolverExecutionLimitReached”的错误

这是请求:

col1  col2  col3 col4   col5       col6
0     1   1.0   1.1    a   True 2021-01-01
1     2   2.0   2.1    b   True 2021-01-02
2     3   3.0   3.1    c   True 2021-01-03
3     4   4.0   4.1    d  False 2021-01-04
4     5   5.0   5.1    e  False 2021-01-05
5     6   6.0   6.1    f  False 2021-01-06
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 6 entries,0 to 5
Data columns (total 6 columns):
 #   Column  Non-Null Count  Dtype         
---  ------  --------------  -----         
 0   col1    6 non-null      int64         
 1   col2    6 non-null      float64       
 2   col3    6 non-null      float64       
 3   col4    6 non-null      object        
 4   col5    6 non-null      bool          
 5   col6    6 non-null      datetime64[ns]
dtypes: bool(1),datetime64[ns](1),float64(2),int64(1),object(1)
memory usage: 374.0+ bytes
None
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 6 entries,0 to 5
Data columns (total 6 columns):
 #   Column  Non-Null Count  Dtype         
---  ------  --------------  -----         
 0   col1    6 non-null      int64         
 1   col2    6 non-null      int64         
 2   col3    6 non-null      float64       
 3   col4    6 non-null      object        
 4   col5    6 non-null      bool          
 5   col6    6 non-null      datetime64[ns]
dtypes: bool(1),float64(1),int64(2),object(1)
memory usage: 374.0+ bytes
None

这是架构:

let destinations = await API.graphql(graphqlOperation(queries.searchDestinations,{filter: { deviceid: { eq: params.id }}}))

这将返回:

type Destination 
  @model
  @searchable
  @auth(rules: [{ allow: public },{ allow: private }])
  @key(name: "byXpoint",fields: ["xpoint"])
  @key(name: "byDevice",fields: ["deviceid"])
  {
    id: ID!
    index: Int!
    levels: [String]
    name: String!
    xpoint: String
    sourceId: ID
    Source: Source @connection
    lock: Boolean
    breakaway: Boolean
    breakaways: String
    probeId: ID!
    probe: Probe @connection(fields: ["probeId"])
    deviceid: ID!
    device: Device @connection(fields: ["deviceid"])
    orgId: ID!
    org: Org @connection(fields: ["orgId"])
}

我的理解是 AppSync API 有一个硬性限制返回超过 1000 个条目,但是这个查询一个只有约 600 个条目的表上并且只返回 384。我通过 NodeJS 直接通过 AppSync 执行相同的命令应用程序,它可以正常工作。

不确定在何处进一步调查以确定触发此错误的原因。非常感谢任何帮助或指导。

解决方法

架构中的连接导致单个请求超出 1000 个请求限制(正如 Mickers 在评论中所述)。更新架构,获取连接较少,问题已解决。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?