[1040] PDOException in Connection.php line 295

SQLSTATE[HY000] [1040] Too many connections

  1. $this->fetchType = $config['result_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 295
  2. at PDO->__construct('mysql:host=127.0.0.1...', 'www_shrx_com_cn', 'rkc4BY2bcRA4zYZY', [0, 2, 0, ...]) in Connection.php line 295
  3. at Connection->connect() in Connection.php line 995
  4. at Connection->initConnect(false) in Connection.php line 348
  5. at Connection->query('SHOW COLUMNS FROM `m...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('`my_member`') in Query.php line 1921
  7. at Query->getTableInfo('my_member', 'type') in Query.php line 1969
  8. at Query->getFieldsType('my_member') in Query.php line 1975
  9. at Query->getFieldsBind('my_member') in Builder.php line 270
  10. at Builder->buildWhere(['AND' => ['key' => null]], ['multi' => ['AND' => ['key' => [null]]], 'where' => ['AND' => ['key' => null]], 'field' => ['key'], ...]) in Builder.php line 240
  11. at Builder->parseWhere(['AND' => ['key' => null]], ['multi' => ['AND' => ['key' => [null]]], 'where' => ['AND' => ['key' => null]], 'field' => ['key'], ...]) in Builder.php line 719
  12. at Builder->select(['multi' => ['AND' => ['key' => [null]]], 'where' => ['AND' => ['key' => null]], 'field' => ['key'], ...]) in Query.php line 2462
  13. at Query->getPdo() in Query.php line 441
  14. at Query->value('key') in common.php line 177
  15. at fun_sc_p('member', ['key' => null], 'key') in common.php line 1510
  16. at include('/home/bt/www.shrx.co...') in App.php line 280
  17. at App::init() in App.php line 182
  18. at App::initCommon() in App.php line 82
  19. at App::run() in start.php line 19
  20. at require('/home/bt/www.shrx.co...') in index.php line 19

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_X_TENCENT_UA
Qcloud
HTTP_C20B171E7BFB1D1B257F636C0029798A
tag
HTTP_X_NWS_LOG_UUID
4884576970531252564
HTTP_14520F0D3A75A226C94BBB363BD6277B
tag
HTTP_TENCENT_ACCELERATION_DOMAIN_NAME
qiyang.shrx.com.cn
HTTP_X_FORWARDED_PROTO
http
HTTP_X_LEGO_VIA
200488
HTTP_X_FORWARDED_FOR
3.87.133.69
HTTP_CONNECTION
keep-alive
HTTP_AF9751204FC60931C046A560898D04C8
tag
HTTP_HOST
qiyang.shrx.com.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
www.shrx.com.cn
SERVER_PORT
80
SERVER_ADDR
121.201.97.83
REMOTE_PORT
42142
REMOTE_ADDR
122.246.31.50
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/home/bt/www.shrx.com.cn
DOCUMENT_URI
/index.php
REQUEST_URI
/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/home/bt/www.shrx.com.cn/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711648477.2076
REQUEST_TIME
1711648477
Environment Variables
empty

ThinkPHP Constants

WEB_URL
index
/
MIFENLEI
ASsZpRjwZRurh5tuiF6zXF56pEGpnC4oq
APP_PATH
./mifenlei/
APP_MI
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-=+
THINK_VERSION
5.0.24
THINK_START_TIME
1711648477.2093
THINK_START_MEM
421432
EXT
.php
DS
/
THINK_PATH
/home/bt/www.shrx.com.cn/thinkphp/
LIB_PATH
/home/bt/www.shrx.com.cn/thinkphp/library/
CORE_PATH
/home/bt/www.shrx.com.cn/thinkphp/library/think/
TRAIT_PATH
/home/bt/www.shrx.com.cn/thinkphp/library/traits/
ROOT_PATH
/home/bt/www.shrx.com.cn/
EXTEND_PATH
/home/bt/www.shrx.com.cn/extend/
VENDOR_PATH
/home/bt/www.shrx.com.cn/vendor/
RUNTIME_PATH
/home/bt/www.shrx.com.cn/runtime/
LOG_PATH
/home/bt/www.shrx.com.cn/runtime/log/
CACHE_PATH
/home/bt/www.shrx.com.cn/runtime/cache/
TEMP_PATH
/home/bt/www.shrx.com.cn/runtime/temp/
CONF_PATH
./mifenlei/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
QINIU_FUNCTIONS_VERSION
7.9.0