title: Why is the connection reset when uploading Wordpress plugin or theme on Ubuntu
body: <p>System OS: </p>
  
  <pre><code>DISTRIB_ID=Ubuntu
  DISTRIB_RELEASE=16.04
  DISTRIB_CODENAME=xenial
  DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS
  </code></pre>
  
  <p>I have installed a LEMP stack:</p>
  
  <pre><code>nginx/1.10.0 (Ubuntu)
  MySQL 5.7.18-0ubuntu0.16.04.1
  PHP 7.0.15-0ubuntu0.16.04.4
  </code></pre>
  
  <p>The system is hanging and displaying a 'connection reset' error message in the browser when I try to upload a theme or a plugin. </p>
  
  <p>I have managed to install some plugins from the Wordpress repository, but I can not install a 15MB plugin I am uploading via a zip from my remote machine via the browser. </p>
  
  <p>I have increased the memory limit to 512mb by editing <code>/etc/php/7.0/fpm/php.ini</code> and the php.ini script is now reporting this is taking effect: </p>
  
  <pre><code>memory_limit    512M    512M
  </code></pre>
  
  <p>I have also increased the max memory limit in <code>wp-config.php</code></p>
  
  <p>by inserting this as the first line in the file: </p>
  
  <pre><code>define('WP_MEMORY_LIMIT', '512M');
  </code></pre>
  
  <p>I have also created the following settings in the php config file at <code>/etc/php/7.0/fpm/php.ini</code>:</p>
  
  <pre><code>max_execution_time = 240
  max_input_time = 240
  upload_max_filesize = 100M
  </code></pre>
  
  <p>Yet plugins or themes are still not uploading. </p>
  
  <p>I have tried both Firefox and Chrome. </p>
  
  <p>In Chrome, you get a % complete while the zip is being uploaded. The upload gets to 44% and then crashes, and I get the 'Connection Reset' error in the browser. </p>
  
  <p>I have changed ownership of the plugin directory and wp-content directory to  <code>www-data:www-data</code>.</p>
  
  <p>I don't know what else to try, any ideas?</p>