[1040] PDOException in Connection.php line 527

SQLSTATE[HY000] [1040] Too many connections

  1. try {
  2. if (empty($config['dsn'])) {
  3. $config['dsn'] = $this->parseDsn($config);
  4. }
  5. if ($config['debug']) {
  6. $startTime = microtime(true);
  7. }
  8. $this->links[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $params);
  9. if ($config['debug']) {
  10. // 记录数据库连接信息
  11. $this->log('[ DB ] CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn']);
  12. }
  13. return $this->links[$linkNum];
  14. } catch (\PDOException $e) {
  15. if ($autoConnection) {

Call Stack

  1. in Connection.php line 527
  2. at PDO->__construct('mysql:host=127.0.0.1...', 'puji', 'zt0611', [0, 2, 0, ...]) in Connection.php line 527
  3. at Connection->connect() in Connection.php line 1965
  4. at Connection->initConnect(false) in Connection.php line 650
  5. at Connection->query('SHOW COLUMNS FROM `s...', [], false, true) in Mysql.php line 90
  6. at Mysql->getFields('`sx_column`') in Connection.php line 376
  7. at Connection->getTableInfo('sx_column', 'bind') in Connection.php line 453
  8. at Connection->getFieldsBind('sx_column') in Builder.php line 287
  9. at Builder->buildWhere(object(Query), ['AND' => ['bigclass=161 and no_order>0' => ['', 'exp', 'bigclass=161 and no_...']]]) in Builder.php line 259
  10. at Builder->parseWhere(object(Query), ['AND' => ['bigclass=161 and no_order>0' => ['', 'exp', 'bigclass=161 and no_...']]]) in Builder.php line 979
  11. at Builder->select(object(Query)) in Connection.php line 925
  12. at Connection->select(object(Query)) in Query.php line 2590
  13. at Query->select() in Base.php line 13
  14. at Base->initialize() in Controller.php line 70
  15. at Controller->__construct()
  16. at ReflectionClass->newInstanceArgs([]) in Container.php line 305
  17. at Container->invokeClass('app\index\controller...', []) in Container.php line 193
  18. at Container->make('app\index\controller...') in App.php line 875
  19. at App->__get('app\index\controller...') in App.php line 606
  20. at App->controller('product', 'controller', false, 'Error') in Module.php line 98
  21. at Module->run() in App.php line 377
  22. at App->think\{closure}(object(Request), object(Closure), null)
  23. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 100
  24. at Middleware->think\{closure}(object(Request))
  25. at call_user_func(object(Closure), object(Request)) in Middleware.php line 66
  26. at Middleware->dispatch(object(Request)) in App.php line 398
  27. at App->run() in index.php line 21

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER
www
HOME
/home/www
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.hbpuji.com
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
PATH_INFO
/product/list-167-3a-cn.html
REDIRECT_STATUS
200
SERVER_NAME
www.hbpuji.com
SERVER_PORT
80
SERVER_ADDR
192.168.0.4
REMOTE_PORT
20000
REMOTE_ADDR
154.93.193.156
SERVER_SOFTWARE
nginx/1.15.10
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/www.hbpuji.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/product/list-167-3a-cn.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/product/list-167-3a-cn.html
SCRIPT_FILENAME
/www/wwwroot/www.hbpuji.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1571267291.8331
REQUEST_TIME
1571267291
Environment Variablesempty
ThinkPHP Constants
PATH
/www/wwwroot/www.hbpuji.com/public