Reputation: 1938
I'm running a Java server on Google App Engine. It seems that the GAE account is using up the 9 free instance hours that come with GAE backend instances, but so far I've mostly been running the server on localhost while in development (with only a handful of live deployments just to test the deployment process). Why are instance hours being consumed?
Upvotes: 0
Views: 97
Reputation: 3277
Even if this is quite an old question and you probably figured this out already, here is the easiest solution: replacing manual-scaling
section with a basic-scaling
one.
Your appengine-web.xml
will look like the one below
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>myApplicationId</application>
<version>1</version>
<threadsafe>true</threadsafe>
<basic-scaling>
<max-instances>1</max-instances>
<idle-timeout>10m</idle-timeout>
</basic-scaling>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties" />
</system-properties>
</appengine-web-app>
This means that, through basic-scaling
, your application will have maximum 1 running instance, and will be passivated (so you will not pay for it) after 10 minutes
Upvotes: 0
Reputation: 1416
What kind of scaling do you have in your project? Basic, manual or automatic?
edit: As you've since indicated you're using manual scaling:
Manual Scaling: A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.
This means that your handful of live deployments probably has at least one in manual scaling mode, which causes your problem
Upvotes: 1