A
A
arinoki2011-10-20 13:45:32
Nginx
arinoki, 2011-10-20 13:45:32

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

2 answer(s)
A
Anatoly, 2011-10-20
@taliban

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.

V
Viktor Taran, 2014-02-07
@shambler81

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 question

Ask a Question

731 491 924 answers to any question