首页 > 其他分享 >es写入时报TransportError(413, '')

es写入时报TransportError(413, '')

时间:2023-08-17 17:32:25浏览次数:49  
标签:opt es py elasticsearch TransportError 413 line packages python3.8

问题现象:

写入时单条或一批次的总数据大小超过es限制就会报 TransportError(413, '')

解决:

修改es配置文件 elasticsearch.yml增加max_content_length,具体大小看实际环境需求,越大性能越差

http.max_content_length: 1024mb


 File "/opt/python3.8/site-packages/elasticsearch/helpers/actions.py", line 300, in bulk
    for ok, item in streaming_bulk(client, actions, *args, **kwargs):
  File "/opt/python3.8/site-packages/elasticsearch/helpers/actions.py", line 221, in streaming_bulk
    for data, (ok, info) in zip(
  File "/opt/python3.8/site-packages/elasticsearch/helpers/actions.py", line 116, in _process_bulk_chunk
    raise e
  File "/opt/python3.8/site-packages/elasticsearch/helpers/actions.py", line 112, in _process_bulk_chunk
    resp = client.bulk("\n".join(bulk_actions) + "\n", *args, **kwargs)
  File "/opt/python3.8/site-packages/elasticsearch/client/utils.py", line 84, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/opt/python3.8/site-packages/elasticsearch/client/__init__.py", line 1484, in bulk
    return self.transport.perform_request(
  File "/opt/python3.8/site-packages/elasticsearch/transport.py", line 351, in perform_request
    status, headers_response, data = connection.perform_request(
  File "/opt/python3.8/site-packages/elasticsearch/connection/http_urllib3.py", line 257, in perform_request
    self._raise_error(response.status, raw_data)
  File "/opt/python3.8/site-packages/elasticsearch/connection/base.py", line 181, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
elasticsearch.exceptions.TransportError: TransportError(413, '')

标签:opt,es,py,elasticsearch,TransportError,413,line,packages,python3.8
From: https://blog.51cto.com/mapengfei/7125695

相关文章

  • esp32 启动流程
    [关于ROM]在esp32上电运行后,芯片运行的第一个程序。这段程序是芯片设计与生产的时候,固化在硬件电路中的。所以它是不可修改的(ReadOnlyMemory)。esp32的ROM负责检测芯片的strapping配置,来决定芯片应该处于什么状态。比如,esp32上电后,ROM程序会检查[GPIO0,GPIO2,GPIO4,......
  • Autodesk Powermill Ultimate 2023(数控机床编程加工软件) v2023.1.1中文永久使用
    AutodeskPowerMillUltimate2023是一款专业的数控加工软件,以下是对其的详细介绍:点击获取AutodeskPowermillUltimate2023 加工策略和路径规划:PowerMillUltimate2023提供了多种高级的加工策略和路径规划功能,帮助用户优化加工过程并实现更高的生产效率。软件支持粗加......
  • games101-homework-notes
    Games101作业笔记Created:2023-06-19T12:00+08:00Published:2023-08-17T16:23+08:00Categories:ComputerGraphics目录pa0hw1ProjectionMatrixTriangleRasterizerprocesshw2insidetrianglerasterize_trianglemyhw2bugs使用\(y+0.5\)setindex导致三角形分裂屏幕两......
  • Autodesk Inventor Professional 2024(三维可视化实体模拟软件)中文永久使用
    AutodeskInventorProfessional2024是一款功能强大的三维计算机辅助设计(CAD)软件,以下是对其的详细介绍:点击获取AutodeskInventorProfessional2024 三维建模工具:AutodeskInventorProfessional2024提供了丰富的三维建模工具,使用户能够创建复杂的实体模型。用户可以......
  • MyBatis resultMap中collection过滤空字段
    在使用MyBatis查询数据时,返回值可以定义为resultMap。如果返回的对象中有列表,还可以使用collection标签进行定义。此时,如果不想某些字段为空的数据加入列表,可以使用notNullColumn属性进行定义:<resultMapid="resultMapDemo"type="返回值类型"><idproperty="id"column=......
  • spring之RestTemplate使用
    1、带有头部信息的get请求//api访问链接Stringhost=aliWuliuConfig.getHost();//API访问后缀Stringpath=aliWuliuConfig.getPath()+"?type={type}&no={no}";Stringurl=host+path;//替换成自己的阿里云appcodeStringappcode=aliWuliuConfig.getAppcode();//......
  • PostgreSQL-log函数的用法
    最近在看关于PostgreSQL内部原理的一些东西,并借助翻译软件,做一些翻译,整理成文档,以便自己能够快速理解的同时,加以记录。在单表查询的开销估算中,关于索引扫描的启动开销,有一个等式,使用到了函数ceil和log2。等式是这样写的:'start-upcost'={ceil(log2(10000))+(1+1)*50}*0.0025=......
  • ERROR 1820 (HY000): You must reset your password using ALTER USER statement befo
    问题描述想要在linux系统里面使用mysql时,出现了这样的报错信息问题解决mysql>setglobalvalidate_password_policy=LOW;mysql>setglobalvalidate_password_length=9;使用这两个命令,将密码的限制进行修改,然后执行修改密码的命令:ALTERUSERUSER()IDENTIFIEDBY'wing......
  • [React Typescript] Discriminated Tuples in Custom Hooks
    import{useEffect,useState}from"react";exporttypeResult<T>=|["loading",undefined?]|["error",Error]|["success",T];exportconstuseData=<T,>(url:string):Result<T>=>......
  • Codeforces Round 883 (Div. 3)
    比赛链接:https://codeforces.com/contest/1846A.RudolphandCuttheRope题意:给n条绳子,知道一端所在高度坐标和各自绳长,他们另一端都连到一个糖果上,问至少剪掉多少绳子糖果能碰到地面思路:显然只有坐标小于绳长的才能让糖果触地,去掉其他的即可B.RudolphandTic-Tac-Toe题......