lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.92k stars 549 forks source link

max_post_data_size #343

Open kiwionly opened 2 years ago

kiwionly commented 2 years ago

hello, I encounter some issue for post file.

I am setting max_post_data_size = 40960000, and try to POST data as application/octet-stream.

While I post a small content ~ 20kb, it work fine.

However, when I try post around 2MB, I get 500 internal server error: The server encountered an internal error that couldn't be recovered from.

What is the max size for max_post_data_size ?

Not sure If I missing something ?

lpereira commented 2 years ago

This could happen if the buffer couldn't be allocated. Lwan tries to use temporary files for request bodies above a certain threshold. One to know for sure what's failing for you is running Lwan under "strace -f" and issue a request.

On Fri, Apr 29, 2022, at 10:09 AM, kiwi wrote:

hello, I encounter some issue for post file.

I am setting max_post_data_size = 40960000, and try to POST data as application/octet-stream.

While I post a small content ~ 20kb, it work fine.

However, when I try post around 2MB, I get 500 internal server error: The server encountered an internal error that couldn't be recovered from.

Not sure If I missing something ?

— Reply to this email directly, view it on GitHub https://github.com/lpereira/lwan/issues/343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADVGJSDNOJMW4Y5IAY7NTVHQCT3ANCNFSM5UWQYIIA. You are receiving this because you are subscribed to this thread.Message ID: @.***>