To see this snippet in the context of a web application, view the README on GitHub.
To see this snippet in the context of a web application, view the README on GitHub.
To see this snippet in the context of a web application, view the README on GitHub.
To see this snippet in the context of a web application, view the README on GitHub.
To see this snippet in the context of a web application, view the README on GitHub.
To see this snippet in the context of a web application, view the README on GitHub.
For private IP paths, your application connects directly to your instance through a VPC network. This method uses TCP to connect directly to the Cloud SQL instance without using the Cloud SQL Auth Proxy.
Connect using the private IP address of your Cloud SQL instance as the host and port 5432
.
To see this snippet in the context of a web application, view the README on GitHub.
To see this snippet in the context of a web application, view the README on GitHub.
Note:
To see this snippet in the context of a web application, view the README on GitHub.
To see this snippet in the context of a web application, view the README on GitHub.
To see this snippet in the context of a web application, view the README on GitHub.
To see this snippet in the context of a web application, view the README on GitHub.
To see this snippet in the context of a web application, view the README on GitHub.
You can use the Cloud SQL Auth Proxy when testing your application locally. See the quickstart for using the Cloud SQL Auth Proxy for detailed instructions.
Connections to underlying databases may be dropped, either by the database server itself, or by the underlying infrastructure. To mitigate this, we recommend that you use a client library that supports connection pools and automatic reconnection.
Each App Engine instance running in a standard environment cannot have more than 100 concurrent connections to an instance. For PHP 5.5 apps, the limit is 60 concurrent connections. This limit applies per application instance. This means that each instance of the App Engine application can have that many connections to the database, and as it scales the total number of connections per deployment can grow. For more information, see Scaling elements.
You can limit the maximum number of connections used per instance by using a connection pool. For more detailed examples on how to limit the number of connections, see the Managing database connections page.
App Engine applications are subject to request time limits depending on usage and environment. For more information, see how instances are managed in App Engine standard environment standard and flexible environments.
App Engine provides a mechanism that connects using the Cloud SQL Auth Proxy, which uses the Cloud SQL Admin API. API quota limits apply to the Cloud SQL Auth Proxy. When the Cloud SQL Admin API starts, it uses a quota of two and an average of two per hour afterwards. The default quota is 180 per minute per user. App Engine applications are also subject to additional quotas and limits as discussed on the App Engine Quotas page.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-17 UTC.