inconsistent daily "frontend instance" costs

317 views
Skip to first unread message

Ehsan Kia

unread,
Dec 11, 2020, 3:04:14 AM12/11/20
to Google App Engine
Every day, I look at the appengine quota page, an hour before it's about to reset for the day, and it's sitting well below the 28h free-tier limit, yet the next day, I check billing for the previous day and I have ~1$ of charges, which at $0.05/hour, that means 20 hours of extra time. So unless my application somehow managed to start 20 instances in the last hour (which isn't possible, the limit is 3), those numbers make no sense.

I remember years ago it was possible to see the quota usage for previous days, but it seems like that page doesn't even exist anymore, so there's no way for me to verify how many frontend instance hours were used in previous days. But the charges I'm getting definitely do not make sense. I never pass 28 hours, yet I'm constantly getting charged every day for "frontend instance".

Is there any way to debug where these costs come from and what my usage is? I'm not sure if GCP intentionally hides this information away, all I can see is the billing cost per day, per SKU, but this still doesn't give me my quota usage, and it doesn't explain why I'm being charged even after being below free tier usage.

Jean-Daniel FISCHER

unread,
Dec 11, 2020, 12:30:12 PM12/11/20
to Google App Engine
Hello, maybe it is due to your instance class. If I remember correctly one hour of an F2 is billed as two hours and F4 is billed as 4 hours.  I think the base idea is that one hour represents one hour of F1. There is this part of the doc that helped us understand our cost when we are facing the same question:

" Important: When you view your bill, you will not see the names of the individual instance classes in your billing line items. Instead, you see instance hours from the "B" classes reported as "Backend Instances", and instance hours from the "F" classes reported as "Frontend Instances". The bill will apply the appropriate multiple of instance hours for each instance class you use. For example, if you use an F4 instance for one hour, you see "Frontend Instance" billing for four instance hours at the F1 rate."

It is extracted from https://cloud.google.com/appengine/pricing.

Ehsan Kia

unread,
Dec 11, 2020, 2:57:20 PM12/11/20
to Google App Engine
I don't think so, since again, the billing section on the AppEngine Dashboard generally takes that into account, in my experience. But yes I've also verified that it is F1.
Again last night, when I wrote this email at 3am, the counter was at 24.5h right before the reset, but today I see a charge of $0.55.

The annoying part is that there seems to be no way to actually see the finalized quota usage to verify these costs. How can I make sure what Google is charging me is the right amount if I can't even see the usage? Is there some API that gives access to that which I'm missing?

vladoi

unread,
Dec 14, 2020, 4:07:10 AM12/14/20
to Google App Engine

Hello, 

Did  you stop serving the previously deployed versions of your GAE Application ?  If you no longer require these versions you can delete the version by following our public official documentation [1] [2]: 

 

[1]. https://cloud.google.com/nodejs/getting-started/delete-tutorial-resources#deleting_app_versions 

[2]. https://cloud.google.com/sdk/gcloud/reference/app/versions/delete.

Ehsan Kia

unread,
Dec 15, 2020, 9:35:55 AM12/15/20
to Google App Engine
None of the older versions are running, and I have an instance limit, but I still went ahead and deleted all the older versions. It's still happening.

I'm pretty convinced AppEngine is miscalculating my usage...

vladoi

unread,
Dec 16, 2020, 3:07:03 AM12/16/20
to Google App Engine
According to the official documentatio:
"Setting the maximum to 1 instance **usually** keeps your instance hour usage within the free tier."
However, please consider the important note:
"Important: App Engine applies the max_instances setting on a best effort basis. In some circumstances, App Engine may briefly exceed the limit you specify."

Ehsan Kia

unread,
Dec 17, 2020, 3:53:50 AM12/17/20
to Google App Engine
it still is strange because the only place that does show my instance usage (the daily dashboard) is always well below 28h. While it does say:
> Due to the way estimates are calculated, the sum of individual resource costs may not match the displayed total exactly.
still, every day i'm being charged ~$0.50, which means 10 extra hours. That's almost 50% more than what's displayed.
Also this issue only started very recently, I haven't had any issues with this for the past 3-4 months.

vladoi

unread,
Dec 18, 2020, 3:42:23 AM12/18/20
to Google App Engine
If you believe that you are being overcharged, I will recommend to create a support case with Google Cloud [1] for a deeper investigation. Please include all the details mentioned on this thread in the case and our Google Cloud Billing Team will provide you an answer regarding your concerns. 

[1]. https://cloud.google.com/support/docs/procedures

Ehsan Kia

unread,
Dec 27, 2020, 7:00:12 PM12/27/20
to Google App Engine
Finally managed to make it go back to zero. Not sure which of the things I did helped, but I did a bunch of stuff. For one, I did listen to your advice and deleted all older versions even though they all had zero instances.
I also optimized my app more and changed max_concurrent_requests / target_throughput_utilization, and a bunch more small things. Either one of those did it, or Google fixed the issue on their end. Either way thank you for the help.

Zvika Ben-Haim

unread,
May 13, 2022, 5:23:03 AM5/13/22
to Google App Engine
I have a very similar situation: 
- Limited to one F1 instance per project
- Looking at App Engine -> Instances -> Billed instances shows under 1 instance at each moment, except for brief moments with two instances
- Yet Billing consistently charges me for several hours of frontend instances.

Tried resolving this via Google's support chat and they were unable to explain the discrepancy, their only suggestion was to purchase a "technical support package" which I doubt will help either.

Also tried deleting old versions (even though they were not running any instances).. did this a week ago, still getting charged.

This is quite annoying! Anyone have a suggestion?

Ernesto Contreras Pinon

unread,
May 13, 2022, 5:13:29 PM5/13/22
to Google App Engine

Each time your instances are started, they accrue instance hours up to 15 minutes after the last request or 15 minutes after the instance is shut down. This behavior can explain instance hours accumulating depending on how the requests are received by App Engine. Which type of scaling is set up for your application? Also which environment are you using (Flex/Standard)?

Reply all
Reply to author
Forward
0 new messages