<div dir="ltr"><div>>>proxy_pass <a href="http://fl008.origin.com" target="_blank">http://fl008.origin.com</a>$uri;<br></div>It didn't work instead the error 502 gateway started to show up when proxying the request via proxy_pass. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 18, 2014 at 6:32 PM, shahzaib shahzaib <span dir="ltr"><<a href="mailto:shahzaib.cb@gmail.com" target="_blank">shahzaib.cb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks a lot for the solution Roman, i'll get back to you after applying the fix. :-)<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 18, 2014 at 6:29 PM, Roman Arutyunyan <span dir="ltr"><<a href="mailto:arut@nginx.com" target="_blank">arut@nginx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Try this directive instead of yours to download the entire file from the backend<br>
<br>
proxy_pass <a href="http://fl008.origin.com" target="_blank">http://fl008.origin.com</a>$uri;<br>
<div><div><br>
<br>
On 18 Sep 2014, at 15:25, shahzaib shahzaib <<a href="mailto:shahzaib.cb@gmail.com" target="_blank">shahzaib.cb@gmail.com</a>> wrote:<br>
<br>
> Yes, the mp4 modules is enabled on origin as well as edge. Could you please help me resolving the issue ?<br>
><br>
> On Thu, Sep 18, 2014 at 4:21 PM, Roman Arutyunyan <<a href="mailto:arut@nginx.com" target="_blank">arut@nginx.com</a>> wrote:<br>
><br>
> On 18 Sep 2014, at 14:49, shahzaib shahzaib <<a href="mailto:shahzaib.cb@gmail.com" target="_blank">shahzaib.cb@gmail.com</a>> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> >    We're using proxy_store on the edge server for replicating requested mp4 files and some of our users reported that some of the videos are half sized and therefore they are unable to stream whole video file on their end (coming from the edge server). On digging into the access_logs of nginx, i found the 500 internal server errors for 10~20 videos and on checking the size of 500 error videos it was half of the size compare to the mirrored video files on the origin. Please check the following error of the culprit video link :-<br>
> ><br>
> > 203.124.62.213 - - [18/Sep/2014:15:13:58 +0500] "GET /files/videos/2014/09/12/1410536044adf1b-360.mp4?start=729 HTTP/1.1" 500 588 "<a href="http://lw3.files.com/files/videos/2014/09/12/" target="_blank">http://lw3.files.com/files/videos/2014/09/12/</a>" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)"<br>
> ><br>
> > I'd like to inform that the issue is coming for 40% of the videos.<br>
> ><br>
> > error_log :-<br>
> ><br>
> > 2014/09/18 15:30:40 [error] 3883#0: *77490 "/var/www/html/files/videos/2014/09/16/141088548798bb1-360.mp4" mp4 start time exceeds file duration, client: 175.110.88.213, server: <a href="http://lw3.files.com" target="_blank">lw3.files.com</a>, request: "GET /files/videos/2014/09/16/141088548798bb1-360.mp4?start=736.8 HTTP/1.1"<br>
> ><br>
> > You can see the "start time exceeds error" on edge server but the video link starting from start=736.8 exists on origin server.<br>
> ><br>
> > Nginx config :-<br>
> ><br>
> > server {<br>
> ><br>
> >         listen       80;<br>
> >         server_name <a href="http://lw3.files.com" target="_blank">lw3.files.com</a>;<br>
> >         root /var/www/html/tunefiles;<br>
> >         location ~ \.(mp4|jpeg|jpg)$ {<br>
> >                root   /var/www/html/tunefiles;<br>
> >                 mp4;<br>
> >         error_page 404 = @fetch;<br>
> ><br>
> >             }<br>
> ><br>
> ><br>
> >         location ~ \.(php)$ {<br>
> >                 proxy_pass <a href="http://fl008.files.net:80" target="_blank">http://fl008.files.net:80</a>;<br>
> >         }<br>
> ><br>
> ><br>
> ><br>
> >         location @fetch {<br>
> >         internal;<br>
> >         proxy_pass <a href="http://fl008.origin.com:80" target="_blank">http://fl008.origin.com:80</a>;<br>
> >         proxy_store        on;<br>
> >             proxy_store_access user:rw group:rw all:r;<br>
> >         root /var/www/html/tunefiles;<br>
> > }<br>
><br>
> Do you have the mp4 module enabled at the origin?  If so then you have partial mp4<br>
> downloaded from there and stored locally.  Note proxy_pass without URI passes<br>
> client URIs to the origin keeping the arguments (including “start”).<br>
><br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
><br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>