Explorar el Código

修正因MariaDB最大连接数引发的bug

James Iter hace 8 años
padre
commit
066feeaab8
Se han modificado 2 ficheros con 2 adiciones y 1 borrados
  1. 1 1
      INSTALL.sh
  2. 1 0
      models/event_processor.py

+ 1 - 1
INSTALL.sh

@@ -148,7 +148,7 @@ function install_MariaDB() {
     sed -i '/\[mysqld\]/a\log-bin' /etc/my.cnf
     sed -i '/\[mysqld\]/a\expire_logs_days = 1' /etc/my.cnf
     sed -i '/\[mysqld\]/a\innodb_file_per_table' /etc/my.cnf
-    sed -i '/\[mysqld\]/a\max_connections = 1000' /etc/my.cnf
+    sed -i '/\[mysqld\]/a\max_connections = 10000' /etc/my.cnf
 
     # 启动并使其随机启动
     systemctl enable mariadb.service

+ 1 - 0
models/event_processor.py

@@ -379,4 +379,5 @@ class EventProcessor(object):
 
             except Exception as e:
                 logger.error(traceback.format_exc())
+                time.sleep(1)