title: Openshift service is not available after short inactivity
body: <p>We have our project hosted in OpenShift (OKD to be precise. We host it ourselves). The setup is as follows:</p>
  <ul>
  <li><p>Routing server (Spring Boot 1.5.8 with Zuul): This one takes all the incoming traffic and routes it to the correct services</p>
  </li>
  <li><p>Multiple services (all with Spring Boot): Here is all the business logic</p>
  </li>
  </ul>
  <p>We use SOAP for calling other services in this project.</p>
  <p>Currently, when we call the application, the call goes to the routing server, which then routes it to the main business service.
  After a short inactivity of about one hour, our main business service is not reachable via the external call. The edge server however is available and callable 100% of the time. We do get a <code>504 Gateway Timeout</code> exception from the system when we call it. We already figured out that this is the timeout of the route in openshift (<code>haproxy.router.openshift.io/timeout</code> in the route).</p>
  <p>The core problem is, that OpenShift seems to hibernate the main business service after an inactivity of about one hour. After a delay of 15 minutes however the calls seem to find their destination and the data gets processed correctly.</p>
  <p>How can we turn this behaviour off?</p>
  <h1>Edit 1:</h1>
  <ul>
  <li>We have the same application in normal &quot;old fashioned&quot; VMs in production. We don't have any problems there.</li>
  <li>We noticed that the services can be &quot;kept alive&quot; when we call them regulary. We built a small service which calls theme regulary (every 15 min). This way it seems to work. But this is not a production ready workaround IMO.</li>
  </ul>
  <h1>Edit 2:</h1>
  <p>Our pod config (some names are anonymized):</p>
  <p><a href="https://gist.github.com/moritzluedtke/6867499b0acbb2d7b5a9a70e49b0d45c" rel="noreferrer">https://gist.github.com/moritzluedtke/6867499b0acbb2d7b5a9a70e49b0d45c</a></p>
  <p>We do not use autoscaler.</p>
  <h1>Edit 3:</h1>
  <p>Our deployment configs (some names are anonymized):</p>
  <p><a href="https://gist.github.com/moritzluedtke/dc7c1078fe9cc7e4aeb737094849fc1b" rel="noreferrer">https://gist.github.com/moritzluedtke/dc7c1078fe9cc7e4aeb737094849fc1b</a></p>
  <pre><code>OpenShift Master:      v3.11.0+1c3e643-87
  Kubernetes Master:     v1.11.0+d4cacc0
  OpenShift Web Console: v3.11.0+ea42280
  </code></pre>
  <h1>Edit 4:</h1>
  <p>It seems that this is not a problem with OpenShift but rather our tech stack. I will update this question, as soon as we have a solution.</p>