python - 尝试检索文档信息时出现 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
我如何检索记录信息,未来记录的数量也会增加。
解决方案
推荐阅读
- javascript - html2canvas + jsPDF 截断图片
- spring-boot - 在 AWS 上嵌入 tomcat 的 Spring Boot 开始失败
- javascript - 使用 Python 和 Flask 填充依赖下拉列表
- elasticsearch - 如何在 spring-data 中关闭 ElasticSearch RestHighLevelClient 以避免声纳阻塞问题 应关闭资源
- c# - 在客户端机器上部署 Winforms 应用程序
- javascript - 当您单击身体或在手机上移动手指时停止滚动
- php - 当 php/laravel 中的数据量很大时,如何在进度条上赋值?
- java - 用逗号格式化 BigDecimal 数字,最多保留 2 位小数
- google-translator-toolkit - 通过企业网络中的防火墙解锁以访问 Google Translate API(高级版)需要哪些 url?
- python - 您如何允许用户通过终端在 Python 脚本中上传 2 个 excel 文件,而不是下载一个新文件?