Partially downloaded javascript file

we have a FreeBSD OS system, nginx web server and php-fpm as PHP CGI. Sometimes .js and .css files are only partially downloaded, 5-7 words are missing at the end of the file, so we have a problem with the visual part of our site, as this becomes an ugly reason for partially loaded javascript or css file. We tried to disable gzip, but that didn't help us. This usually happens after loading a modified css or javascript file.

Nginx Version: 0.7.65

Nginx Configuration:

worker_processes  100;
worker_priority -5;
worker_rlimit_nofile 51200;

events {
    worker_connections  51200;
    use kqueue;
}

http {
    include mime.types;
    default_type  application/octet-stream;
    log_format main '$remote_addr - $remote_user [$time_local] ' '"$request_filename" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent" "$http_x_forwarded_for"';
    server_names_hash_bucket_size 512;
    sendfile on;
    tcp_nopush on;
    keepalive_timeout 70 30;
    send_timeout 30s;
    reset_timedout_connection on;
    resolver 127.0.0.1;
    resolver_timeout 10s;

    server_tokens off;
    client_max_body_size 5m;

    open_file_cache max=100000 inactive=40s;
    open_file_cache_valid 60s;
    open_file_cache_min_uses 2;
    open_file_cache_errors on;

#gzip on;

.................. ..................

I hope this part of the configuration is enough to help us.

+3
source share
2 answers

This problem is the result open_file_cache.

Cause

open_file_cache , inode. , Nginx . open_file_cache Nginx, , .

( : open_file_cache off), Atom akira ( mv rename).

+4

Usually this happens after we upload modified css or javascript file.

nginx , ?

, / .

0

Source: https://habr.com/ru/post/1755740/


All Articles