You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending a very large request, Nginx (of kong) buffers it in a file. However, in a plugin, if I attempt to read the body from the request, it doesn't retrieve the body from that file and returns an error. The solution I found is to increase the Nginx buffer size, which works, but this is not ideal, especially when receiving multiple large requests, as is my case.
a client request body is buffered to a temporary file /usr/local/kong/client_body_temp/0000000001
/usr/local/share/lua/5.1/MessagePack.lua:126: attempt to get length of local 'str' (a nil value)
Expected Behavior
Expected Behavior:
The body should be retrievable from the file without needing to increase the buffer size of nginx.
Steps To Reproduce
Steps to Reproduce:
Send a very large request to kong.
Attempt to read the body from the request within a plugin.
Observe that the body is not retrieved from the file and an error is returned.
Anything else?
a client request body is buffered to a temporary file /usr/local/kong/client_body_temp/0000000001,
/usr/local/share/lua/5.1/MessagePack.lua:126: attempt to get length of local 'str'
The text was updated successfully, but these errors were encountered:
Hicham-Chahboune
changed the title
Proxy Buffering Settings Cause Issues Despite Adequate Configuration
Proxy Buffering Settings Cause Issues
Jun 15, 2024
This is by design and not a bug for PDK.
It looks like you are using JS or Python PDK; currently, we do not support reading from cached files. We have a WIP PR to support it: a76d657 (#13158)
Is there an existing issue for this?
Kong version (
$ kong version
)3.7.0
Current Behavior
When sending a very large request, Nginx (of kong) buffers it in a file. However, in a plugin, if I attempt to read the body from the request, it doesn't retrieve the body from that file and returns an error. The solution I found is to increase the Nginx buffer size, which works, but this is not ideal, especially when receiving multiple large requests, as is my case.
Current Configuration:
proxy_buffering on;
proxy_buffer_size 32k;
proxy_buffers 64 16k;
proxy_busy_buffers_size 256k;
proxy_max_temp_file_size 200m;
proxy_temp_file_write_size 1024k;
ERROR MESSAGE:
a client request body is buffered to a temporary file /usr/local/kong/client_body_temp/0000000001
/usr/local/share/lua/5.1/MessagePack.lua:126: attempt to get length of local 'str' (a nil value)
Expected Behavior
Expected Behavior:
The body should be retrievable from the file without needing to increase the buffer size of nginx.
Steps To Reproduce
Steps to Reproduce:
Anything else?
a client request body is buffered to a temporary file /usr/local/kong/client_body_temp/0000000001,
/usr/local/share/lua/5.1/MessagePack.lua:126: attempt to get length of local 'str'
The text was updated successfully, but these errors were encountered: