Pricing and Access Limits

When connecting to Cloud SQL from App Engine applications, consider pricing and limits for both.

For instructions on how to connect to Cloud SQL, see Using Cloud SQL.

Cloud SQL

For information on Cloud SQL billing plans and limits, see the Cloud SQL Pricing page and the Cloud SQL FAQ.

There are limits imposed from both Cloud SQL and App Engine.

Cloud SQL for MySQL Second Generation connection limits

Machine type Maximum concurrent connections
db-f1-micro 250
db-g1-small 1,000
All other machine types 4,000

Cloud SQL for PostgreSQL connection limits

Memory size, in GiB Maximum concurrent connections*
0.6 (db-f1-micro) 25
1.7 (db-g1-small) 50
3.75 up to 6 100
6 up to 7.5 150
7.5 up to 15 200
15 up to 30 250
30 up to 60 300
60 up to 120 400
120 and above 500

*Cloud SQL for PostgreSQL reserves up to six of these connections for internal operations.

Cloud SQL for MySQL First Generation connection limits

Incoming connection requests are briefly queued before the connection is established. The queue can accept only 100 incoming connection requests.

Tier Maximum concurrent connections
D0 - D2 250
D4 500
D8 1,000
D16 2,000
D32 4,000

Cloud SQL storage limits

MySQL First Generation instances MySQL Second Generation instances PostgreSQL instances Notes
250 GB Up to 10,230 GB, depending on machine type Up to 10,230 GB, depending on whether the instance has dedicated or shared vCPUs. It is possible to increase individual First Generation instance limits up to 500 GB for customers with a Silver or higher Google Cloud support package.

For information on Cloud SQL billing plans and limits, see the Cloud SQL Pricing page.

App Engine

Requests from App Engine applications to Cloud SQL are subject to the following time and connection limits:

  • All database requests must finish within the HTTP request time limit, which is around 60 seconds.
  • Offline requests such as cron tasks have a time limit of 10 minutes.
  • Requests to Cloud SQL have limitations based on the scaling type of the App Engine module and how long an instance can remain in memory (residence).
  • Each App Engine instance running in the standard environment cannot have more than 60 concurrent connections to a Cloud SQL instance.

App Engine applications are also subject to the App Engine quotas.

Was this page helpful? Let us know how we did:

Send feedback about...

App Engine standard environment for Java