apache / apache/apisix-python-plugin-runner

file upload error

Đang mở
#59 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
42
Fork
24
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Route - Plugin Config -> ext-plugin-pre-req enable

{
"_meta": {
"disable": false
},
"conf": [
{
"name": "rewrite",
"value": "{\"body\":\"hello\"}"
}
]
}

when Plugin enabled , file upload show error: 503 Service Temporarily Unavailable

if file size less than 220kb , upload show success, large than 220kb show error

error log
----------------------------------------
context: ngx.timer
2023/03/17 14:23:05 [warn] 10354#10354: *113 [lua] init.lua:955:
Exception in thread Thread-14:
Traceback (most recent call last):
File "/usr/local/python3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/python3.7/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/server/server.py", line 60, in _threaded
response = handler.dispatch()
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/server/handle.py", line 83, in dispatch
ok = runner_plugin.execute(configs, self.r, req, resp)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/plugin/core.py", line 99, in execute
raise e
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/plugin/core.py", line 91, in execute
p.filter(conf, req, reps)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/plugins/rewrite.py", line 61, in filter
body = request.get_body()
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/http/request.py", line 144, in get_body
val = self.__ask_extra_info(builder, EIInfo.Info.ReqBody, body_req_data)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/http/request.py", line 193, in __ask_extra_info
vector = resp.Result(i)
File "/usr/local/python3.7/lib/python3.7/site-packages/A6/ExtraInfo/Resp.py", line 32, in Result
return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1))
File "/usr/local/python3.7/lib/python3.7/site-packages/flatbuffers/table.py", line 93, in Get
return flags.py_type(encode.Get(flags.packer_type, self.Bytes, off))
File "/usr/local/python3.7/lib/python3.7/site-packages/flatbuffers/encode.py", line 26, in Get
return packer_type.unpack_from(memoryview_type(buf), head)[0]
struct.error: unpack_from requires a buffer of at least 1 bytes

Exception in thread Thread-15:
Traceback (most recent call last):
File "/usr/local/python3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/python3.7/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/server/server.py", line 60, in _threaded
response = handler.dispatch()
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/server/handle.py", line 83, in dispatch
ok = runner_plugin.execute(configs, self.r, req, resp)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/plugin/core.py", line 99, in execute
raise e
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/plugin/core.py", line 91, in execute
p.filter(conf, req, reps)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/plugins/rewrite.py", line 61, in filter
body = request.get_body()
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/http/request.py", line 144, in get_body
val = self.__ask_extra_info(builder, EIInfo.Info.ReqBody, body_req_data)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/http/request.py", line 193, in __ask_extra_info
vector = resp.Result(i)
File "/usr/local/python3.7/lib/python3.7/site-packages/A6/ExtraInfo/Resp.py", line 32, in Resu, context: ngx.timer
2023/03/17 14:23:05 [warn] 10354#10354: *113 [lua] init.lua:955: lt
return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1))
File "/usr/local/python3.7/lib/python3.7/site-packages/flatbuffers/table.py", line 93, in Get
return flags.py_type(encode.Get(flags.packer_type, self.Bytes, off))
F, context: ngx.timer
2023/03/17 14:23:05 [warn] 10354#10354: *113 [lua] init.lua:955: ile "/usr/local/python3.7/lib/python3.7/site-packages/flatbuffers/encode.py", line 26, in Get
return packer_type.unpack_from(memoryview_type(buf), head)[0]
struct.error: unpack_from requires a buffer of at least 1 bytes

Exception in thread Thread-16:
Traceback (most recent call last):
File "/usr/local/python3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/python3.7/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/server/server.py", line 60, in _threaded
response = handler.dispatch()
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/server/handle.py", line 83, in dispatch
ok = runner_plugin.execute(configs, self.r, req, resp)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/plugin/core.py", line 99, in execute
raise e
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/plugin/core.py", line 91, in execute
p.filter(conf, req, reps)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/plugins/rewrite.py", line 61, in filter
body = request.get_body()
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/http/request.py", line 144, in get_body
val = self.__ask_extra_info(builder, EIInfo.Info.ReqBody, body_req_data)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/http/request.py", line 193, in __ask_extra_info
vector = resp.Result(i)
File "/usr/local/python3.7/lib/python3.7/site-packages/A6/ExtraInfo/Resp.py", line 32, in Result
return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1))
File "/usr/local/python3.7/lib/python3.7/site-packages/flatbuffers/table.py", line 93, in Get
return flags.py_type(encode.Get(flags.packer_type, self.Bytes, off))
File "/usr/local/python3.7/lib/python3.7/site-packages/flatbuffers/encode.py", line 26, in Get
return packer_type.unpack_from(memoryview_type(buf), head)[0]
struct.error: unpack_from requires a buffer of at least 1 bytes

Exception in thread Thread-23:
Traceback (most recent call last):
File "/usr/local/python3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/python3.7/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/server/server.py", line 60, in _threaded
response = handler.dispatch()
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/server/handle.py", line 83, in dispatch
ok = runner_plugin.execute(configs, self.r, req, resp)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/plugin/core.py", line 99, in execute
raise e
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/plugin/core.py", line 91, in execute
p.filter(conf, req, reps)
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/plugins/rewrite.py", line 61, in filter
body = request.get_body()
File "/usr/local/python3.7/lib/python3.7/site-packages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/http/request.py", line 144, in get_body
val = self.__ask_extra_info(builder, EIInfo.Info.ReqBody, body_req_data)
File "/usr/local/python3.7/lib/python3.7/site-p, context: ngx.timer
2023/03/17 14:23:05 [warn] 10354#10354: *113 [lua] init.lua:955: ackages/apache_apisix-0.2.0-py3.7.egg/apisix/runner/http/request.py", line 193, in __ask_extra_info
vector = resp.Result(i)
File "/usr/local/python3.7/lib/python3.7/site-packages/A6/ExtraInfo/Resp.py", line 32, in Result
return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + fla, context: ngx.timer
2023/03/17 14:23:05 [warn] 10354#10354: *113 [lua] init.lua:955: tbuffers.number_types.UOffsetTFlags.py_type(j * 1))
File "/usr/local/python3.7/lib/python3.7/site-packages/flatbuffers/table.py", line 93, in Get
return flags.py_type(encode.Get(flags.packer_type, self.Bytes, off))
File "/usr/local/python3.7/lib/python3.7/site-packages/flatbuffers/encode.py", line 26, in Get
return packer_type.unpack_from(memoryview_type(buf), head)[0]
struct.error: unpack_from requires a buffer of at least 1 bytes
, context: ngx.timer
2023/03/17 14:23:05 [error] 10351#10351: *125273 send() failed (32: Broken pipe), client: 192.168.100.22, server: _, request: "POST /common/oss/upload HTTP/1.0", host: "dsj.com:9443", referrer: "http://dsj.com:9443/"

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.