[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...', 'youwei_you', 'SOKoXJIs', [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 `h...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('`hunuo_web_config`') in Query.php line 1921
  7. at Query->getTableInfo('hunuo_web_config', 'type') in Query.php line 1969
  8. at Query->getFieldsType('hunuo_web_config') in Query.php line 1975
  9. at Query->getFieldsBind('hunuo_web_config') in Builder.php line 270
  10. at Builder->buildWhere(['AND' => ['object_name' => 'website']], ['multi' => ['AND' => ['object_name' => ['website']]], 'where' => ['AND' => ['object_name' => 'website']], 'table' => 'hunuo_web_config', ...]) in Builder.php line 240
  11. at Builder->parseWhere(['AND' => ['object_name' => 'website']], ['multi' => ['AND' => ['object_name' => ['website']]], 'where' => ['AND' => ['object_name' => 'website']], 'table' => 'hunuo_web_config', ...]) in Builder.php line 719
  12. at Builder->select(['multi' => ['AND' => ['object_name' => ['website']]], 'where' => ['AND' => ['object_name' => 'website']], 'table' => 'hunuo_web_config', ...]) in Query.php line 2663
  13. at Query->find() in WebConfig.php line 51
  14. at WebConfig::getWebConfigValue(['object_name' => 'website'], 0) in db_function.php line 101
  15. at getWebConfig('website') in config.php line 4
  16. at include('/home/youwei/domains...') in Config.php line 80
  17. at Config::load('/home/youwei/domains...') in App.php line 249
  18. at App::init('home/') in App.php line 526
  19. at App::module([null, 'article', 'details'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  20. at App::exec(['type' => 'module', 'module' => [null, 'article', 'details'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  21. at App::run() in start.php line 19
  22. at require('/home/youwei/domains...') in index.php line 33

Environment Variables

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

Server/Request Data

CONTEXT_DOCUMENT_ROOT
/home/youwei/domains/youwei.gz15.hostadm.net/public_html
CONTEXT_PREFIX
DOCUMENT_ROOT
/home/youwei/domains/youwei.gz15.hostadm.net/public_html
GATEWAY_INTERFACE
CGI/1.1
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_AUTHORIZATION
HTTP_HOST
www.youweichina.com
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
PATH
/bin:/usr/bin
PHPRC
/usr/local/php54/lib/
QUERY_STRING
s=details/76.html
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_QUERY_STRING
s=details/76.html
REDIRECT_STATUS
200
REDIRECT_UNIQUE_ID
ZiEep8h5e3EgETrn3SXgqgAAARo
REDIRECT_URL
/details/76.html
REMOTE_ADDR
156.224.36.123
REMOTE_PORT
20001
REQUEST_METHOD
GET
REQUEST_SCHEME
http
REQUEST_URI
/details/76.html
SCRIPT_FILENAME
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/index.php
SCRIPT_NAME
/index.php
SERVER_ADDR
103.41.232.115
SERVER_ADMIN
webmaster@youwei.gz15.hostadm.net
SERVER_NAME
www.youweichina.com
SERVER_PORT
80
SERVER_PROTOCOL
HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache/2
UNIQUE_ID
ZiEep8h5e3EgETrn3SXgqgAAARo
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1713446567.108
REQUEST_TIME
1713446567
HTTP_ACCEPT_LANGUAGE
zh-cn
PATH_INFO
details/76.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/app/
WEB_ROOT
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/
CONF_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/config/
RUNTIME_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/runtime/
UPLOAD_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/upload/
PUBLIC_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/public/
QDWEB_VERSION
v1.1.0
NOW_TIME
1713446567
THINK_VERSION
5.0.24
THINK_START_TIME
1713446567.98
THINK_START_MEM
414336
EXT
.php
DS
/
THINK_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/thinkphp/
LIB_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/thinkphp/library/
CORE_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/thinkphp/library/think/
TRAIT_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/thinkphp/library/traits/
ROOT_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/
EXTEND_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/extend/
VENDOR_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/vendor/
LOG_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/runtime/log/
CACHE_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/runtime/cache/
TEMP_PATH
/home/youwei/domains/youwei.gz15.hostadm.net/public_html/runtime/temp/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
USER_STATUS_NONE
0
USER_STATUS_NORMAL
1
USER_STATUS_DISABLED
2
AAAA____
AAAA___A
AAA_AAA_
AAA_AAAA
AAA_AA__
AAA_AA_A
AAA_A_A_
AAA_A_AA
AAA_A___
AAA_A__A
AAA__AA_
AAA__AAA
AAA_____
AAA____A
AA_A___A
AA_A__A_
AA__A_A_
AA__A_AA
AA___A__
AA___A_A
AA______
AA_____A
A_AAAAA_
A_AAAAAA
A_AAA_A_
A_AAA_AA
A_AA_AA_
A_AA_AAA
A_A_AA_A
A_A_AAA_
A_A_A_AA
A_A_AA__
A_A_A__A
A_A_A_A_
A_A__AA_
A_A__AAA
A_A__A__
A_A__A_A
A_A____A
A_A___A_
A__AAAA_
A__AAAAA
A__AAA__
A__AAA_A
A__A_A__
A__A_A_A
A___AA_A
A___AAA_
AAAAAAA
A_______
AAAA___
AAAA__A
AAA__AA
AAA_A__
AA_AAAA
AAA____
AA_AA_A
AA_AAA_
AA_A_AA
AA_AA__
AA__AAA
AA_A___
A_AAAA_
A_AAAAA
A_AA_AA
A_AAA__
A_A___A
A_A__A_
A__AAA_
A__AAAA
A__A__A
A__A_A_
AAA__A
AAA_A_
AA__AA
AA_A__
A_AAA_
A_AAAA
A_A_AA
A_AA__
A_A___
A_A__A
A__A__
A__A_A
AAA_
AAAA
AA__
50