title: Randomly "502 bad gateway" on production, but it's ok on dev machine (express js)
body: <p>I've got a node js script (Express js framework). I have a problem with this server only on production - on developer machine everything is good. </p>
  
  <p>On developer machine an on production this server is running in Docker container. Container if from the same image of course.</p>
  
  <p>The problematic scenario:</p>
  
  <ol>
  <li><p>Start server </p></li>
  <li><p>Make a request:</p>
  
  <p>2.1. upload file to server and save in on hard disc drive</p>
  
  <p>2.2. send a POST request via curl to microservice. This request is send to micorservice the file from 2.1 point. It's POST request. We use node-libcurl library</p>
  
  <p>2.3. After long time (few minutes) microservice returns a response.</p>
  
  <p>2.4. This response is saved on server.  </p>
  
  <p>2.5. Print a template.</p></li>
  </ol>
  
  <p>On developer machine this request works totally correctly: from point 2.1 to 2.5. </p>
  
  <p>But on production machine this request works correctly do all points except 2.5. I know it works good on 2.1-2.4 because server logs this information.</p>
  
  <p>Production is on <a href="https://www.linode.com/" rel="nofollow noreferrer">https://www.linode.com/</a>. </p>
  
  <p>Have you any idea what's wrong?</p>
  
  <p>EDIT:
  I forgot to mention, but server on production returns "502 bad gateway" error randomly for the same file and microservice response. Sometimes this requests is ok</p>