[1040] PDOException in Connection.php line 282

SQLSTATE[08004] [1040] Too many connections

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

Call Stack

  1. in Connection.php line 282
  2. at PDO->__construct('mysql:dbname=zp_stoc...', 'root', '516636cf05', [1, 0, 2, ...]) in Connection.php line 282
  3. at Connection->connect() in Connection.php line 845
  4. at Connection->initConnect(true) in Mysql.php line 52
  5. at Mysql->getFields('gf_nav') in Query.php line 1482
  6. at Query->getTableInfo('gf_nav', 'type') in Query.php line 1530
  7. at Query->getFieldsType(['field' => ['id', 'title', 'url'], 'where' => ['AND' => ['parentid' => ['eq', 0], 'status' => ['eq', 1]]], 'order' => 'orderid', ...]) in Query.php line 1536
  8. at Query->getFieldsBind(['field' => ['id', 'title', 'url'], 'where' => ['AND' => ['parentid' => ['eq', 0], 'status' => ['eq', 1]]], 'order' => 'orderid', ...]) in Builder.php line 245
  9. at Builder->buildWhere(['AND' => ['parentid' => ['eq', 0], 'status' => ['eq', 1]]], ['field' => ['id', 'title', 'url'], 'where' => ['AND' => ['parentid' => ['eq', 0], 'status' => ['eq', 1]]], 'order' => 'orderid', ...]) in Builder.php line 223
  10. at Builder->parseWhere(['AND' => ['parentid' => ['eq', 0], 'status' => ['eq', 1]]], ['field' => ['id', 'title', 'url'], 'where' => ['AND' => ['parentid' => ['eq', 0], 'status' => ['eq', 1]]], 'order' => 'orderid', ...]) in Builder.php line 638
  11. at Builder->select(['field' => ['id', 'title', 'url'], 'where' => ['AND' => ['parentid' => ['eq', 0], 'status' => ['eq', 1]]], 'order' => 'orderid', ...]) in Query.php line 1959
  12. at Query->select() in Base.php line 18
  13. at Base->_initialize() in Controller.php line 57
  14. at Controller->__construct(object(Request))
  15. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 253
  16. at App::invokeClass('app\index\controller...') in Loader.php line 410
  17. at Loader::controller('news', 'controller', false, 'Error') in App.php line 379
  18. at App::module(['index', 'news', 'newsdetail'], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 140
  19. at App::run() in start.php line 18
  20. at require('/alidata/www/stock/t...') in index.php line 24

Environment Variables

GET Data
classid 6
id 846
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
REDIRECT_STATUS 200
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
HTTP_HOST www.zyddcm.com
HTTP_ACCEPT */*
PATH /sbin:/usr/sbin:/bin:/usr/bin
LD_LIBRARY_PATH /alidata/server/httpd/lib
SERVER_SIGNATURE
SERVER_SOFTWARE Apache/2.4.2 (Unix) PHP/5.5.7
SERVER_NAME www.zyddcm.com
SERVER_ADDR 10.100.10.9
SERVER_PORT 80
REMOTE_ADDR 107.165.144.242
DOCUMENT_ROOT /alidata/www/stock
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /alidata/www/stock
SERVER_ADMIN you@example.com
SCRIPT_FILENAME /alidata/www/stock/index.php
REMOTE_PORT 46352
REDIRECT_QUERY_STRING s=index/news/newsdetail&classid=6&id=846
REDIRECT_URL /index/news/newsdetail
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING s=index/news/newsdetail&classid=6&id=846
REQUEST_URI /index/news/newsdetail?classid=6&id=846
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1653113181.191
REQUEST_TIME 1653113181
PATH_INFO index/news/newsdetail
Environment Variablesempty
ThinkPHP Constants
APP_PATH /alidata/www/stock/application/
APP_DEBUG true
THINK_VERSION 5.0.4
THINK_START_TIME 1653113181.1923
THINK_START_MEM 230736
EXT .php
DS /
THINK_PATH /alidata/www/stock/thinkphp/
LIB_PATH /alidata/www/stock/thinkphp/library/
CORE_PATH /alidata/www/stock/thinkphp/library/think/
TRAIT_PATH /alidata/www/stock/thinkphp/library/traits/
ROOT_PATH /alidata/www/stock/
EXTEND_PATH /alidata/www/stock/extend/
VENDOR_PATH /alidata/www/stock/vendor/
RUNTIME_PATH /alidata/www/stock/runtime/
LOG_PATH /alidata/www/stock/runtime/log/
CACHE_PATH /alidata/www/stock/runtime/cache/
TEMP_PATH /alidata/www/stock/runtime/temp/
CONF_PATH /alidata/www/stock/application/
CONF_EXT .php
ENV_PREFIX PHP_
IS_CLI false
IS_WIN false
<var></var>
<nobr id='FQMdcj'><base></base></nobr>
    <base id='IPv'><thead></thead></base>
    <dfn></dfn>
    <basefont id='QvwYkeA'><pre></pre></basefont><bgsound id='xCQervq'><address></address></bgsound>
    <font></font>
    <em id='jbR'><address></address></em><dfn></dfn>