[Python] When using mysql.connector.aio how do we enable connection pooling (assuming it is...

Discussão em 'Python' iniciado por Stack, Março 10, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to port my old mysql connector code to use the asyncio libraries provided by MySQL. When I tried to run it, it said it didn't recognize the pool_name and pool_size.

    It didn't explicitly state in the documentation that pooling is not supported. AIOMysql does support pooling.

    But I was also thinking, if I am running on a single thread, why would I need connection pooling? Maybe that's why it isn't explicitly supported by the MySQL AIO drivers?

    There's a forum question but doesn't really address whether connection pooling is needed or not.

    https://stackoverflow.com/a/66222924/242042 seems to indicate that connection pooling isn't worth it, but it could be specific to AIOMysql.

    Continue reading...

Compartilhe esta Página