
Google App Engine fiasco :-( - narayanb
Never used App Engine before, was always on AWS.<p>Recently for my Andriod app, I thought of giving GAE a try. The app was on Firebase, the only &quot;Server&quot; I needed was  to send a push notifications (Downstream). So, I just went &quot;Google Cloud Module&quot; wizard with &quot;Endpoints&quot; option on Android Studio.<p>And created this simple servlet.<p>&#x2F;<i></i>
 * An endpoint class we are exposing
 <i>&#x2F;
@Api(
  name = &quot;pushApi&quot;,
  version = &quot;v3&quot;,
  namespace = @ApiNamespace(
                ownerDomain = &quot;com.example.sample&quot;,
                ownerName = &quot;com.example.sample&quot;,
                packagePath = &quot;&quot;
  )
)<p>public class MyEndpoint {<p><pre><code>    PushBean response = new PushBean();

    &#x2F;**
     * A simple endpoint method that takes a name and says Hi back
     *&#x2F;

    @ApiMethod(name = &quot;pushToTopic&quot;)

    public PushBean toTopic(@Named(&quot;topic&quot;) String topic, @Named(&quot;dataJson&quot;) String dataJson) {

        try{
            response.messageTopic(topic,dataJson);
            return response;
        }catch(Exception e){
            return null;
        }
    }
</code></pre>
}<p>And deployed this on my backend. After 1 month of running in staging (I hadn&#x27;t published the app yet and I would have called the end point around 1000 times), I got a bill of around $450. It said I had consumed around 8600+ hours of GAE instance. I almost fell of my chair when I saw that. Even if my instance ran all through the month, it could have only cost 720 hours.<p>I am just wondering what happened. What am I missing here? Did I do anything stupid?
Can someone help me?
======
towndrunk
It sounds to me like you are on Google Compute not Google App Engine. If you
are running on App Engine you would have a *appspot.com domain. Unless you
setup a domain with App Engine.

~~~
narayanb
I don't think so. This is what my billing statement says -

App Engine Backend Instances: 8146.607 Hours (Source: __ __[h __ _-5_ __6])

~~~
towndrunk
There are also two App Engine backends... Standard Environment and Flexible
Environment. See here (upper left):

[https://cloud.google.com/appengine/docs](https://cloud.google.com/appengine/docs)

Flexible runs on Compute whereas Standard runs on the well known App Engine.

------
dougdescombaz
You can put a limit on spending. I"ve had a mistake from billing from them
that they rectified. I'm sure you've take the step to contact them.

