A
A
ArtemPugachev2010-11-17 22:43:56
Nginx
ArtemPugachev, 2010-11-17 22:43:56

Does nginx give 404 error from time to time?

The site either works normally, sometimes it lags in places.
When adding comments, news items, nginx 404 may give an error. From the second time everything goes smoothly. 502 errors did not occur.
There are 1000 people on the site.
What could be? In which direction to dig? "To many connections" mysql does not issue.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Anatoly Egorov, 2010-11-17
@alxrt

I can assume that the lines responsible for the error are

location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav| bmp|rtf|js)$ {
root /var/test.lan/;

If possible, you need to enable error logging in nginx and see at what url's 404 is issued, and also if the specified url's do not match the above regex.

U
undead_ekb, 2010-11-18
@undead_ekb

404 is issued because test.lan:8080 for some reason does not return a response. Dig in the direction of the timeout and / or use FastCGI because reverse proxy is not good.

F
Futurist, 2012-08-23
@Futurist

all the hat, it is necessary like this:
location / { root /var/www/site.ru; index index.php index.htm index.html; if (!-e $request_filename ) { rewrite ^(.*)$ /index.php?q=$1; } }

A
Alexey Kartashov, 2014-03-11
@antixrist

Artyom, do not tell me - did you localize the problem?
Faced exactly the same behavior of nginx. Where to dig - I do not know. Google does not provide clear answers. The only related link from its output is the link to this page..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question