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.
There are limits imposed from both Cloud SQL and App Engine.
Cloud SQL storage limits
|MySQL First Generation instances||MySQL Second Generation instances||PostgreSQL instances||Notes|
|250 GB||Up to 30,720 GB, depending on machine type||Up to 30,720 GB, depending on whether the instance has dedicated or shared vCPUs.||If you have a Silver or higher Google Cloud support package, you can request an increase of up to 500 GB for First Generation instances by using this form.|
For information on Cloud SQL billing plans and limits, see the Cloud SQL Pricing page.
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 100 concurrent connections to a Cloud SQL instance. For Java 7, Go 1.6, or PHP 5.5 apps the limit is 60 concurrent connections.
App Engine applications are also subject to the App Engine quotas.