Forums

mysql.connector.errors.OperationalError: 2055: Lost connection to MySQL server at 'there was host', system error: 32 Broken pipe

Hello, guys. I use MySQL with aiogram for my bot. For connecting i use mysql.connector. After ~5 minutes i get this error after sending a command. I tried to use try...except, but nothing changed. I am quite new in python.

mysql.connector.errors.OperationalError: 2055: Lost connection to MySQL server at 'there was host', system error: 32 Broken pipe

How do you manage (close) your unused connections? Do you use some ORM or you do it manually?