next up previous contents
Next: About this document ... Up: 問題解決 Previous: 問題十   Contents

問題十一

  1. 網頁出現錯誤訊息如下:
    Error: Database connection failed
    
    It is possible that the database is overloaded or otherwise not running properly.
    
    The site administrator should also check that the database details have been correctly specified in config.php
    
  2. 查看 /var/log/httpd/error_log 有以下錯誤訊息。
    PHP Warning:  mysqli::mysqli(): (08004/1040): Too many connections in /var/www/html/moodle23/lib/dml/mysqli_native_moodle_database.php on line 377
    
  3. 解決方式:在 /etc/my.cfgsection [mysqld] 中加入最大連線數量設定。
    [root@dywang ~]# grep max /etc/my.cnf
    [mysqld]
    .......
    max_connections = 500
    max_user_connections = 500
    



2017-08-04