title: Deployment fails with a 504
body: <p>I'm trying to deploy an application to the Swisscom App Cloud from the console. It reports progress until at the end, an 504 without further explanation is reported:</p>
  
  <pre><code>Updating app helloclass-fe-develop in org UCID-Bern Team / space HELLOCLASS-TEST as christian.cueni@iterativ.ch...
  OK
  
  Uploading helloclass-fe-develop...
  FAILED
  Error processing app files: Error uploading application.
  Server error, status code: 504, error code: 0, message: 
  </code></pre>
  
  <p>The log of the app reports that the app has been updated: </p>
  
  <pre><code>2017-01-03 09:37:39 [RTR/0] OUT helloclass-develop.scapp.io - [03/01/2017:08:37:39.584 +0000] "GET / HTTP/1.1" 200 0 594 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36 Google Favicon" 66.249.93.201:50868 10.0.18.35:64341 x_forwarded_for:"83.76.152.96" x_forwarded_proto:"https" vcap_request_id:8a8adcc7-9e97-4bd9-4492-68e92883ee3d response_time:0.001739219 app_id:310166b4-f3a6-4168-a9ac-530e45dbfb10 app_index:0
  2017-01-03 09:37:39 [APP/PROC/WEB/0] OUT 83.76.152.96, 66.249.93.201, 66.249.93.201 - - - [03/Jan/2017:08:37:39 +0000] "GET / HTTP/1.1" 200 606
  2017-01-03 10:05:50 [API/2] OUT Updated app with guid 310166b4-f3a6-4168-a9ac-530e45dbfb10 ({"name"=&gt;"helloclass-fe-develop"})
  2017-01-03 10:57:15 [API/1] OUT Updated app with guid 310166b4-f3a6-4168-a9ac-530e45dbfb10 ({"state"=&gt;"STOPPED"})
  2017-01-03 10:57:15 [CELL/0] OUT Exit status 0
  2017-01-03 10:57:15 [APP/PROC/WEB/0] OUT Exit status 0
  2017-01-03 10:57:15 [CELL/0] OUT Destroying container
  2017-01-03 10:57:15 [CELL/0] OUT Successfully destroyed container
  2017-01-03 10:57:16 [API/1] OUT Updated app with guid 310166b4-f3a6-4168-a9ac-530e45dbfb10 ({"state"=&gt;"STARTED"})
  2017-01-03 10:57:16 [CELL/0] OUT Creating container
  2017-01-03 10:57:16 [CELL/0] OUT Successfully created container
  2017-01-03 10:57:17 [CELL/0] OUT Starting health monitoring of container
  2017-01-03 10:57:19 [CELL/0] OUT Container became healthy
  </code></pre>
  
  <p>In spite of those messages which would indicate that the app has been updated, I still see the old version of the app being served.</p>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>After running the command with the <code>-v</code> parameter, I see that the reason for the failure is a gateway timeout:</p>
  
  <pre><code>RESPONSE: [2017-01-03T13:32:39+01:00]
  HTTP/1.1 504 Gateway Timeout
  Connection: close
  Content-Length: 176
  Cache-Control: no-cache, no-store, max-age=0, must-revalidate
  Content-Type: text/html
  Date: Tue, 03 Jan 2017 12:32:39 GMT
  Expires: 0
  Pragma: no-cache
  Strict-Transport-Security: max-age=15768000; includeSubDomains
  X-Content-Type-Options: nosniff
  X-Frame-Options: DENY
  X-Vcap-Request-Id: 3ac831ef-e70b-4f4e-7c56-e308806f039e
  X-Xss-Protection: 1; mode=block
  
  &lt;html&gt;
  &lt;head&gt;&lt;title&gt;504 Gateway Time-out&lt;/title&gt;&lt;/head&gt;
  &lt;body bgcolor="white"&gt;
  &lt;center&gt;&lt;h1&gt;504 Gateway Time-out&lt;/h1&gt;&lt;/center&gt;
  &lt;hr&gt;&lt;center&gt;nginx&lt;/center&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  FAILED
  Error processing app files: Error uploading application.
  Server error, status code: 504, error code: 0, message: 
  </code></pre>
  
  <p>Is this something cloudfoundry specific or rather related to Swisscom AppCloud? Are there cloudfoundry inherent timeout limits?  </p>