Answer the question
In order to leave comments, you need to log in
Nginx + apache 2, ubuntu 11.10, 504 error?
I write one script and video of certain formats is converted using ffmpeg. And apparently nginx does not have time to wait for a response from Apache, as a result of which this error occurs.
I looked for information - apparently it is necessary to increase the values of keepalive_timeout, client_header_timeout, client_body_timeout and send_timeout in the nginx config.
But maybe there is some more elegant solution?
Answer the question
In order to leave comments, you need to log in
There is one great solution - a queue and deferred actions. I advise you to take an interest in this topic and not to convert realtime.
as an option, let the Apache do it personally. Skip proxying this kind of files in this folder.
there is also try_files
error_page 404 = @fallback;
#--------------All 404s are sent to Apache for processing----------------------------- --
location @fallback {
proxy_pass http://$host:82;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question