I’m having an issue with my App Engine backend where the instance hours counter shows twice what it should be.
I have a scheduled job that adds two identical tasks to a queue for backend processing:
// first task
taskQueue.add(withUrl("/process/workitem").param(..).header("Host", backend.getAddress("worker-backend")));
// second task
taskQueue.add(withUrl("/process/workitem").param(..).header("Host", backend.getAddress("worker-backend")));
My queue is configured to process tasks sequentially:
<queue>
<name>work-queue</name>
<rate>1/m</rate>
<max-concurrent-requests>1</max-concurrent-requests>
<bucket-size>1</bucket-size>
<retry-parameters>
<task-retry-limit>1</task-retry-limit>
<min-backoff-seconds>10</min-backoff-seconds>
<max-backoff-seconds>200</max-backoff-seconds>
<max-doublings>2</max-doublings>
</retry-parameters>
</queue>
The weird thing is that when my backend runs for about 4 hours, the dashboard reports around 8 instance hours. The queue shows “Running=1” and “Tasks in Queue=2”, and I’ve confirmed my backend has only 1.0 instances configured.
Why is the billing showing double the actual runtime?