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/"