title: Pricing of Google App Engine Flexible env, a $500 lesson
body: <p>I followed the Nodejs on App Engine Flexible env tutorial:
  <a href="https://cloud.google.com/appengine/docs/flexible/nodejs/create-app" rel="nofollow noreferrer">https://cloud.google.com/appengine/docs/flexible/nodejs/create-app</a></p>
  <p>Having successfully deployed and tested the tutorial, I changed the code to experiment a little and successfully deployed it... and then left it running since this was a testing environment (not public).</p>
  <p>A month later, I receive a bill from Google for over $370!</p>
  <p>In the transaction details I see the following:</p>
  <blockquote>
  <p>Oct 1 – 31, 2017 App Engine Flex Instance RAM: 5948.774 Gibibyte-hours
  ([MYPROJECT]) $42.24</p>
  </blockquote>
  <blockquote>
  <p>Oct 1 – 31, 2017 App Engine Flex Instance Core Hours: 5948.774 Hours ([MYPROJECT]) $312.91</p>
  </blockquote>
  <p>How did this testing environment with almost 0 requests require about 6,000 hours of resources? In the worst, I would have assume 720 hrs running fulltime for a month @ $0.05 per hour would cost me ~$40.
  <a href="https://cloud.google.com/appengine/pricing" rel="nofollow noreferrer">https://cloud.google.com/appengine/pricing</a></p>
  <p>Can someone help shed light on this? I have not been able to find out why so many resources were needed?</p>
  <p>Thanks for the help!</p>
  <p>For more data, this is the traffic over the last month (basically 0):
  <a href="https://i.stack.imgur.com/zX7rr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zX7rr.png" alt="Traffic Data" /></a></p>
  <p>And instance data<a href="https://i.stack.imgur.com/zboyq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zboyq.png" alt="Instance Data" /></a></p>
  <p>UPDATE:
  Note that I did bring one modification to the package.json: I added nodemon as a dependency and added it as part of my &quot;nmp start&quot; script. Though I doubt this explains the 6000 hours of resources:</p>
  <pre><code>  &quot;scripts&quot;: {
      &quot;deploy&quot;: &quot;gcloud app deploy&quot;,
      &quot;start&quot;: &quot;nodemon app.js&quot;,
      &quot;dev&quot;: &quot;nodemon app js&quot;,
      &quot;lint&quot;: &quot;samples lint&quot;,
      &quot;pretest&quot;: &quot;npm run lint&quot;,
      &quot;system-test&quot;: &quot;samples test app&quot;,
      &quot;test&quot;: &quot;npm run system-test&quot;,
      &quot;e2e-test&quot;: &quot;samples test deploy&quot;
    },
  </code></pre>
  <p>App.yaml (default-no change from tutorial)</p>
  <pre><code>runtime: nodejs
  env: flex
  </code></pre>