I’m running windows server 2016 vm with Diango 3.1.1, Python 3.7.9 (mysqlclient 2.0.1) and MariaDB 10.5.4.
After a few hours/minutes randomly django web pages do not connect for a few seconds with the error:
Other python scripts connecting the database fail with the same error.
File "c:\Python37\lib\site-packages\MySQLdb\__init__.py", line 130, in Connect
return Connection(*args, **kwargs)
File "c:\Python37\lib\site-packages\MySQLdb\connections.py", line 185, in __init__
super().__init__(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (2002, "Can't connect to MySQL server on '127.0.0.1' (10060)")
I have no errors in MariaDB logs or in event viewer.
With “SELECT * FROM information_schema.processlist” I have less than 15 processes
My.ini
[mysqld]
datadir=C:/Program Files/MariaDB 10.5/data
port=3306
innodb_buffer_pool_size=1023M
slow_query_log=1
long_query_time=5.0
bind-address = 0.0.0.0
max_allowed_packet=64M
Can anybody help me solve this? Any reply will be appreciated.