title: Magento 2 product export 503 error Server Unavailable
body: <p>I am trying to export about 5500 products from Magento 2 and I'm receiving a 503 error. I've increased the PHP memory limit to 2GB in the <code>php.ini</code> and <code>.htaccess</code> </p>
  
  <pre><code>.htaccess
      php_value memory_limit 2048M
      php_value max_execution_time 372000
  </code></pre>
  
  <p>Apache has been restarted as well. But I still am receiving the <code>503 error</code>. How can I fix this issue?
  The last known error I received from the system.log that was for this was</p>
  
  <pre><code>[2018-02-27 10:01:55] main.WARNING: Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size. Please update innodb_buffer_pool_size or decrease batch size value (which decreases memory usages for the temporary table). Current batch size: 100000; Allocated memory size: 2300000000 bytes; InnoDB buffer pool size: 6442450944 bytes.
  </code></pre>
  
  <p>I have fixed this following the advice from 
  <a href="https://magento.stackexchange.com/questions/211415/magento2-decrease-batch-size-of-catalog-category-product/211421#211421">magento2 decrease batch size of catalog_category_product</a></p>
  
  <p>There seem to be no errors being logged in the magento directory, but the 503 error still seems to happen on product exports. The file eventually shows up in the database for download, but there is no automatic download when exporting. </p>
  
  <p>After about 30 seconds into the export I am shown this error.</p>
  
  <blockquote>
    <p><strong>Service Unavailable</strong> The server is temporarily unable to service your
    request due to maintenance downtime or capacity problems. Please try
    again later.</p>
  </blockquote>