Page MenuHomePhabricator

Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
Closed, InvalidPublic

Description

Sometimes while i using my phabricator instance, for example in Pholio module, i get this error message (in browser's console) and dont get moqups because they dosen't loaded. After pressing Ctrl+R in browser everything woks fine.

Please can you explain me how i can solve this problem? And where is the root of problem?

I have not configured file domain. I using nginx as webserver, php-fpm and PHP 7.1.

Event Timeline

saggid updated the task description. (Show Details)

For example, just try to load few times this file from our webserver.

In one of 10-20 times loading of image is stopping before it loaded on 100%. Please how i can fix this behavoiur?

Please provide complete reproduction steps the upstream can follow as well as your installs version information. This information is required before we accept any bug report. See Contributing Bug Reports for more information. If you'd like a clean environment to test in, please use a test instance at Phacility.

I apologize, just this error is so floating that I still can not understand at what level it is. Now I come home, I load the picture - and it loads well enough.

I can't say, I see a lot of questions about it with nginx though with a little googling. Going to close this, feel free to comment again if you can reliably reproduce it for us.

Hello. I just to say what i finded solution.

Root of problem somewhere in connection between Nginx and PHP-FPM. If we set nginx configuration to this value:

fastcgi_max_temp_file_size        0;

Everything works fine!

So, i have now this nginx config for own phabricator instance:

server {
  root /path/to/phabricator/webroot;
  
  listen 80 default_server;

  location / {
    index index.php;
    rewrite ^/(.*)$ /index.php?__path__=/$1 last;
  }

  location = /favicon.ico {
    try_files $uri =204;
  }
  
  location /index.php {
    fastcgi_pass   unix:/run/php/php7.1-fpm.sock;
    fastcgi_index   index.php;

    # required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # variables to make the $_SERVER populate in PHP
    fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  HTTPS              true;

    fastcgi_max_temp_file_size        0;
  }
}

I hope it help to someone.