Wednesday 27 June 2018

Nginx warning - A client request body is buffered to a temporary file /var/cache/nginx/client_temp/


Today I saw a unknown warning error on the Nginx server that it happens when i was trying to upload a file to a website, checking the logs I found this error "A client request body is buffered to a temporary file "

This is my log file:
2018/06/27 12:27:38 [warn] 20230#20230: *743 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000007, client: 10.177.6.42, server: 10.177.6.45, request: "POST /creation/upload/component/9656/video/ HTTP/1.1", host: "10.177.6.45", referrer: "http://10.177.6.45/creation/upload/component/9656/video/"

 

Solution :

 

While investigating this, I found that the size of the uploaded file is larger than memory buffer set for my file uploads.

After that I changed the "client_body_buffer_size" variable value in Nginx configuration file

[root@server ]# vim /etc/nginx/conf.d/default.conf

client_body_buffer_size 100M;

Then restart the nginx service

[root@server ]# service nginx restart
Stopping nginx:                                            [  OK  ]
Starting nginx:                                            [  OK  ]

[root@server]#


My issue is resolved.

No comments:

Post a Comment