una icon indicating copy to clipboard operation
una copied to clipboard

Infinite loading of some files with bx_smart_readfile and $iCacheAge

Open rednaxal opened this issue 4 years ago • 0 comments

BXC

For some files while using the bx_smart_readfile with $iCacheAge other than 0 it results in an infinite loading in FireFox. Happens not with all files and not on all servers. The file that allows to reproduce the problem can be found here.

Example of a call resulting in an infinite resource loading in FireFox: bx_smart_readfile('strangefile.mp4', 'output.mp4', 'video/mp4', 60);


Еhe problem is related to Nginx fastcgi_cache settings, when it happened the following settings were in effect:

    location ~ \.(php|php5)$ {
        include /etc/nginx/fastcgi_params;

        fastcgi_cache UNACACHE;
        fastcgi_cache_valid 200 5m;
        fastcgi_cache_bypass $no_cache;
        fastcgi_no_cache $no_cache;

        try_files $uri =404;
        fastcgi_pass unix:/var/run/php/php-fpm.sock;
        fastcgi_index index.php;
        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;
        fastcgi_param  HTTPS $https if_not_empty;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
http {

        ...

        gzip on;

        gzip_http_version 1.1;
        gzip_min_length 256;
        gzip_vary on;
        gzip_comp_level 5;
        gzip_proxied any;
        gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
        gzip_buffers 16 8k;

rednaxal avatar Oct 13 '20 09:10 rednaxal