首页 > 解决方案 > 尝试检索文档信息时出现 Couchbase.exceptions._TimeoutError

问题描述

我正在将 python 3 与 couchbase 客户端一起使用。我在 couchbase 存储桶中有 461378 条记录,使用的 RAM/配额为 3.77GB / 5.78GB。我正在尝试使用以下代码检索文档:

    list_of_rows = []
    for idx, product_details in enumerate(CouchRepo.get_product_details_iterator()):
        list_of_rows.append(get_required_dict_for_df(product_details["data"]))

但我收到以下错误:

in __iter__
    raw_rows = self.raw.fetch(self._mres)
couchbase.exceptions._TimeoutError_0x17 (generated, catch TimeoutError): <RC=0x17[Client-Side timeout exceeded for operation. Inspect network conditions or increase the timeout], HTTP Request failed. Examine 'objextra' for full result, Results=1, C Source=(src/http.c,144), OBJ=ViewResult<rc=0x17[Client-Side timeout exceeded for operation. Inspect network conditions or increase the timeout], value=None, http_status=0, tracing_context=0, tracing_output=None>, Tracing Output={":nokey:0": null}>

基本上内部代码,

  while self._do_iter:
     raw_rows = self.raw.fetch(self._mres)
     for row in self._process_payload(raw_rows):
         yield row

我尝试设置不同的 operation_timeout 但得到相同的错误。我还检查了如何为存储桶或节点分配更多 RAM,但没有得到任何解决方案。我浏览了以下链接,但没有找到任何实现细节。

https://docs.couchbase.com/python-sdk/current/client-settings.html

https://docs.couchbase.com/server/current/install/sizing-general.html

我如何检索记录信息,未来记录的数量也会增加。

标签: pythondatabasecouchbase

解决方案


推荐阅读