When connecting to Google Cloud SQL from Google App Engine, 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 instances limits
|Limit||MySQL First Generation instances||MySQL Second Generation instances||PostgreSQL instances||Notes|
|Concurrent connections||Determined by tier||4,000||100|
|Enqueued connection requests||100||N/A||N/A||First Generation instances only. Incoming connection requests are briefly queued before the connection is established. The queue can accept only 100 incoming connection requests.|
|Storage size||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.
Requests from Google App Engine applications to Google 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 Google 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 a standard environment cannot have more than 12 concurrent connections to a Google Cloud SQL instance.
App Engine applications are also subject to the App Engine quotas.