January 07, 2011 11:06PM
Ok found the problem the send of the flv or mp4 is being triggered by an X-Accel-Redirect header who's content type is text/html. It seems this header is maintained by nginx when processing the flv send instead of setting up one from the configured mime.types.

This is because the flv modules calls ngx_http_set_content_type to set this up which returns NGX_OK without making any changes if there is already content_type for the request. An existing content_type already seems to be being inherited from the original response containing the X-Accel-Redirect header, hence no change and the problem.

The docs clear state this is the case here: http://wiki.nginx.org/XSendfile

This doesn't effect mp4's which I was testing with originally as the mp4 module blindly sets video/mp4 so works fine in this case.

So sorry for the noise all a case of gotcha I'm afraid.
Subject Author Posted

gzip causing high cpu load for streaming traffic

steveh January 07, 2011 08:39PM

Re: gzip causing high cpu load for streaming traffic

Maxim Dounin January 07, 2011 09:36PM

Re: gzip causing high cpu load for streaming traffic

steveh January 07, 2011 09:51PM

Re: gzip causing high cpu load for streaming traffic

steveh January 07, 2011 09:53PM

Re: gzip causing high cpu load for streaming traffic

steveh January 07, 2011 10:13PM

Re: gzip causing high cpu load for streaming traffic

steveh January 07, 2011 11:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 159
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready