Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot post large body. #67

Open
azuryyu opened this issue Mar 31, 2017 · 3 comments
Open

Cannot post large body. #67

azuryyu opened this issue Mar 31, 2017 · 3 comments

Comments

@azuryyu
Copy link

azuryyu commented Mar 31, 2017

I found that echo-module cannot print nginx log when I post a large body,(not so large, such as more than 20K);

Everything works fine if I post a client body smaller than 1kb, there are good Nginx logs.
It doesn't work If client body size is more than several TEN KB bytes. the client body is '-' in the Nginx log.

I've added 'echo_read_request_body;' in the location to avoid an empty $request_body because Nginx may save client body to a temp file;
I've configured following in my Nginx.conf:

client_max_body_size 1024M;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;

@agentzh
Copy link
Member

agentzh commented Apr 1, 2017

@azuryyu The standard $request_body variable of the nginx core won't read large request bodies buffered on the disk (by the nginx core).

See https://github.com/openresty/echo-nginx-module#echo_request_body

@agentzh
Copy link
Member

agentzh commented Apr 1, 2017

@azuryyu For meaningful values in $request_body, you should configure client_body_buffer_size as well. It's more about the nginx core's $request_body behavior. I'm tired of educating people on standard nginx behaviors. alas.

@azuryyu
Copy link
Author

azuryyu commented Apr 5, 2017

I've configured client_body_buffer_size = 10m before I submitted this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants