Establecer el grupo de conexiones y los límites de desbordamiento cuando se usa SQLAlchemy
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Configura el tamaño del grupo de conexiones y el desbordamiento cuando te conectas a Cloud SQL para MySQL mediante SQLAlchemy.
Explora más
Para obtener documentación detallada en la que se incluye esta muestra de código, consulta lo siguiente:
Muestra de código
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],[],[],[],null,["# Set connection pool and overflow limits when using SQLAlchemy\n\nConfigure the connection pool size and overflow when connecting to Cloud SQL for MySQL by using SQLAlchemy.\n\nExplore further\n---------------\n\n\nFor detailed documentation that includes this code sample, see the following:\n\n- [Manage database connections](/sql/docs/mysql/manage-connections)\n\nCode sample\n-----------\n\n### Python\n\n\nTo authenticate to Cloud SQL for MySQL, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n # Pool size is the maximum number of permanent connections to keep.\n pool_size=5,\n # Temporarily exceeds the set pool_size if no connections are available.\n max_overflow=2,\n # The total number of concurrent connections for your application will be\n # a total of pool_size and max_overflow.\n\nWhat's next\n-----------\n\n\nTo search and filter code samples for other Google Cloud products, see the\n[Google Cloud sample browser](/docs/samples?product=cloud_sql_mysql)."]]