I got following warning from Nginx error log when I'm uploading a large file (5GB),
2014/06/09 22:30:13 [warn] 14170#0: *3 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000001, client: 10.170.24.90, server: 127.0.0.1, request: "POST files/test_file HTTP/1.1", host: "10.119.140.39"
The interesting part is I can't find the temporary file /var/cache/nginx/client_temp/0000000001
ls: cannot access /var/cache/nginx/client_temp/0000000001: No such file or directory
All the temp path settings are default, anyone knows where to find the temp file?
Temp file was deleted immediately after sending it to backend or after closing client`s session if file wasn`t uploaded.
If you can`t uploading file, check if nginx has access to write into /var/cache/nginx/client_temp/.
Related
Linux installation of Phusion Passenger(R) 6.0.14 on nginx/1.14.1. I'm not able to load a site (on a simplified nginx.conf with the conf.d/passenger.conf and conf.d/site1.conf includes. That error:
2022/08/03 19:24:34 [alert] 55601#0: *3 Error opening '/home/user3/sites/Passengerfile.json' for reading: Permission denied (errno=13);
This error means that the Nginx worker process (PID 55601, running as UID 992) does not have permission to access this file.
Please read this page to learn how to fix this problem: https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/?a=upon-accessing-the-web-app-nginx-reports-a-permission-denied-error;
Extra info, client: 192.168.1.4, server: domain1.com, request: "GET / HTTP/1.1", host: "server_f.local"
I don't even know what to ask, other than how can I get this to work? That file doesn't exist. I've restarted nginx many times, and this is the only feedback that I get. I've checked over that page, which tells me to look at the error log it's reported in already. The host and server are correct, and I am on my LAN.
I have been experimenting with the lua web framework, lapis, recently. My issue is that when I run lapis server, and try to connect to the website via my browser (localhost:8081), I receive the following error: 500 Internal Server Error. In the logs I get a whole spew of errors:
coroutine 0:
[C]: in function 'require'
content_by_lua(nginx.conf.compiled:22):2: in main chunk, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", host: "localhost:8081"
2022/08/19 16:54:44 [error] 46270#4681084: *3 lua entry thread aborted: runtime error: content_by_lua(nginx.conf.compiled:22):2: module 'lapis' not found:
no field package.preload['lapis']
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/site/lualib/lapis.ljbc'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/site/lualib/lapis/init.ljbc'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/lualib/lapis.ljbc'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/lualib/lapis/init.ljbc'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/site/lualib/lapis.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/site/lualib/lapis/init.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/lualib/lapis.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/lualib/lapis/init.lua'
no file './lapis.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/luajit/share/luajit-2.1.0-beta3/lapis.lua'
no file '/usr/local/share/lua/5.1/lapis.lua'
no file '/usr/local/share/lua/5.1/lapis/init.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/luajit/share/lua/5.1/lapis.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/luajit/share/lua/5.1/lapis/init.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/site/lualib/lapis.so'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/lualib/lapis.so'
no file './lapis.so'
no file '/usr/local/lib/lua/5.1/lapis.so'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/luajit/lib/lua/5.1/lapis.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
This is weird as I have all of these things installed. Does anyone know what the root of my problem might be?
lapis work on luajit 5.1 only. You might have 5.2 or 5.3 installed. Make sure you pin the version to 5.1 while installing.
my route is fetching user tokens
GET /tokens
average response time is around 180ms and response is json.
using Flask + nginx.
some requests, the response content is truncated at around 33kb, thus the JSON is malformed. some requests, with the same parameters, at nearly the same time, the response is ok at around 216kb.
My question is, why is this happening and why is this happening in an un consist way?
here is flask response code
class NormalResponse(Response):
def __init__(self, response):
super(NormalResponse, self).__init__(response, 200)
res = json.dumps(paginator.paginate(tokens))
return NormalResponse(res)
I found the issue related to nginx since the failed responses have this logs
2018/12/18 16:35:17 [crit] 16#16: *95010 open() "/var/tmp/nginx/uwsgi/1/42/0000000421" failed (13: Permission denied) while reading upstream, client: 172.31.72.76, server: , request: "GET /tokens?limit=501&offset=0&order=desc&owner_id=11111 HTTP/1.1", upstream: "uwsgi://unix:/run/server.socket:", host: "oauth.dev.bla_bla.com"
Seems like response overflows proxy_buffers and tries to temporarily save it to proxy_temp_path and your error message quite confirms it. You should check file permissions of nginx's user on that folder.
This problem has been resolved by adding
RUN chown -R www-data:www-data /var/tmp/nginx
to the Dockerfile
I'm having, in a PHP form, when I'm submiting one email as a suscriber in a Wordpress theme, the next error in error.log:
2013/08/03 21:39:22 [error] 19544#0: *11 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(TEMPLATEPATH/functions/theme-functions.php): failed to open stream: No such file or directory in /web/domain.com/public/wp-content/themes/launcheffect/functions.php on line 151
PHP message: PHP Fatal error: require_once(): Failed opening required 'TEMPLATEPATH/functions/theme-functions.php' (include_path='.:/usr/share/php:/usr/share/pear') in /web/domain.com/public/wp-content/themes/launcheffect/functions.php on line 151" while reading response header from upstream, client: 71.28.74.212, server: www.domain.com, request: "POST /wp-content/themes/launcheffect/post.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.domain.com", referrer: "http://www.domain.com/"
I've been reading about permissions, about nginx and fastcgi, about PHPfpm, reviewing my config...without success. More, I've other sites working perfectly, and that theme worked well some days ago.
Of course I've that file/directory.
My nginx.conf:
http://pastebin.com/5VB1BzHj
Can anyone help me to solve this error?
Thanks in advance!
Looking at your example error it appears you are not formatting the require correctly. It should look something like this:
require_once(TEMPLATEPATH . '/functions/theme-functions.php');
Make certain that you are also defining your TEMPLATEPATH.
define("TEMPLATEPATH ", "/this/is/your/path");
In the end, this should output a string:
/this/is/your/path/functions/theme-functions.php
For anyone having this problem, double check your file paths and file names as mine was caused by a case sensitive file path where I had missed an Uppercase letter
I'm using named pipes as the log file for the access_log of my nginx, I want to know what happens internally in nginx when I delete and recreate the pipe. What I note is that nginx keep working but stop logging.
Even if i don't create again the pipe nginx didn't try to create a regular file for logging.
I don't want to lose my logs, but apparently the only option is to restart nginx, can I enforce nginx to check again for the log file?
The error log only says this, even if the pipe doesn't exists or the pipe is recreated:
2012/02/27 22:45:13 [alert] 24537#0: *1097 write() to "/tmp/access.log.fifo" failed (32: Broken pipe) while logging request, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "localhost:8002"
Thanks.
AFIAK, you need to send nginx a USR1 signal to instruct it to reopen the log files. Basically nginx will keep trying to write to the file-descriptor for the old files (that's why you are seeing the Broken Pipe error). More info here:
http://wiki.nginx.org/LogRotation (also click through the other links at the bottom of that page).
hth