I have a small Java GAE hobby project using Google's CloudSQL MySQL and Hibernate. I have already used up my $300 promotional credit, and have been surprised just how expensive the CloudSQL is. Looking closer at the billing, it seems clear that I am being billed for almost continual running. A typical month invoice might specify:
Cloud SQL DB standard Intel N1 1 VCPU running in Americas (with 30% promotional discount): 719 Hours
I am certain that the db is actually be utilized a tiny fraction of that time. What are the factors in a GAE app that might cause the CloudSQL to be "running"? Is it primarily driven by the DB connection/pooling, as managed by Hibernate? Or is it dependent upon whether or not a GAE instance is running (which I believe is configurable?)?
Here are the connection pooling settings in my persistence.xml:
<property name="hibernate.c3p0.max_size" value="100" />
<property name="hibernate.c3p0.min_size" value="1" />
<property name="hibernate.c3p0.acquire_increment" value="1" />
<property name="hibernate.c3p0.idle_test_period" value="300" />
<property name="hibernate.c3p0.max_statements" value="50" />
<property name="hibernate.c3p0.timeout" value="500" />