[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...', 'sakura', 'fGLHaPfdJriiwhZH', [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 `s...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('sakura_vod') in Query.php line 1921
  7. at Query->getTableInfo('sakura_vod', 'type') in Query.php line 1969
  8. at Query->getFieldsType('sakura_vod') in Query.php line 1975
  9. at Query->getFieldsBind('sakura_vod') in Builder.php line 270
  10. at Builder->buildWhere(['AND' => ['vod_status' => ['eq', 1], 'vod_name' => ['like', '%2017%']]], ['multi' => ['AND' => ['vod_status' => [['eq', 1]], 'vod_name' => [['like', '%2017%']]]], 'where' => ['AND' => ['vod_status' => ['eq', 1], 'vod_name' => ['like', '%2017%']]], 'field' => [object(Expression)], ...]) in Builder.php line 240
  11. at Builder->parseWhere(['AND' => ['vod_status' => ['eq', 1], 'vod_name' => ['like', '%2017%']]], ['multi' => ['AND' => ['vod_status' => [['eq', 1]], 'vod_name' => [['like', '%2017%']]]], 'where' => ['AND' => ['vod_status' => ['eq', 1], 'vod_name' => ['like', '%2017%']]], 'field' => [object(Expression)], ...]) in Builder.php line 720
  12. at Builder->select(['multi' => ['AND' => ['vod_status' => [['eq', 1]], 'vod_name' => [['like', '%2017%']]]], 'where' => ['AND' => ['vod_status' => ['eq', 1], 'vod_name' => ['like', '%2017%']]], 'field' => [object(Expression)], ...]) in Query.php line 2462
  13. at Query->getPdo() in Query.php line 441
  14. at Query->value('COUNT(*) AS tp_count', 0, true) in Query.php line 576
  15. at Query->aggregate('COUNT', '*', true) in Query.php line 551
  16. at Query->count() in Vod.php line 45
  17. at Vod->listData(['vod_status' => ['eq', 1], 'vod_name' => ['like', '%2017%']], 'vod_time desc', 1, 10, 0, '*', 1, 1) in Vod.php line 546
  18. at Vod->listCacheData('{"num":"10","paging"...') in 475c91429ab69e9b12c607cc716d7eb7.php line 280
  19. at include('/home/www/sakura/run...') in File.php line 53
  20. at File->read('/home/www/sakura/run...', ['maccms' => ['site_name' => '樱花动漫', 'site_url' => 'www.yhdm9.net', 'site_wapurl' => '', ...], 'user' => ['user_id' => 0, 'user_name' => '游客', 'user_portrait' => 'static/images/touxia...', ...], 'param' => ['page' => '1', 'ajax' => '0', 'tid' => '0', ...]]) in Template.php line 188
  21. at Template->fetch('template/mytheme/htm...', ['maccms' => ['site_name' => '樱花动漫', 'site_url' => 'www.yhdm9.net', 'site_wapurl' => '', ...], 'user' => ['user_id' => 0, 'user_name' => '游客', 'user_portrait' => 'static/images/touxia...', ...], 'param' => ['page' => '1', 'ajax' => '0', 'tid' => '0', ...]], []) in Think.php line 86
  22. at Think->fetch('vod/search', ['maccms' => ['site_name' => '樱花动漫', 'site_url' => 'www.yhdm9.net', 'site_wapurl' => '', ...], 'user' => ['user_id' => 0, 'user_name' => '游客', 'user_portrait' => 'static/images/touxia...', ...], 'param' => ['page' => '1', 'ajax' => '0', 'tid' => '0', ...]], []) in View.php line 163
  23. at View->fetch('vod/search', [], [], []) in Controller.php line 120
  24. at Controller->fetch('vod/search') in All.php line 47
  25. at All->label_fetch('vod/search') in Vod.php line 43
  26. at Vod->search()
  27. at ReflectionMethod->invokeArgs(object(Vod), []) in App.php line 343
  28. at App::invokeMethod([object(Vod), 'search'], []) in App.php line 611
  29. at App::module([null, 'vod', 'search'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  30. at App::exec(['type' => 'module', 'module' => [null, 'vod', 'search'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  31. at App::run() in start.php line 19
  32. at require('/home/www/sakura/thi...') in index.php line 47

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty

Session

think
{ "last_searchtime": 1711641224 }

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/home/www/sakura/index.php
QUERY_STRING
s=/vodsearch/2017-------------.html
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/search.asp?searchword=2017
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/home/www/sakura
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
http
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.24.0
REMOTE_ADDR
3.235.75.229
REMOTE_PORT
48594
SERVER_ADDR
103.135.32.156
SERVER_PORT
80
SERVER_NAME
yhdmba.org
REDIRECT_STATUS
200
PATH_INFO
/vodsearch/2017-------------.html
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_REFERER
http://m.imomoe.io/search.asp?searchword=2017
HTTP_HOST
www.yhdmba.org
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711641224.0955
REQUEST_TIME
1711641224
Environment Variables
empty

ThinkPHP Constants

ROOT_PATH
/home/www/sakura/
APP_PATH
/home/www/sakura/application/
MAC_COMM
/home/www/sakura/application/common/common/
MAC_HOME_COMM
/home/www/sakura/application/index/common/
MAC_ADMIN_COMM
/home/www/sakura/application/admin/common/
MAC_START_TIME
1711641224.0961
BIND_MODULE
index
ENTRANCE
index
IN_FILE
/index.php
TITLE_MOBILE
1
THINK_VERSION
5.0.24
THINK_START_TIME
1711641224.0971
THINK_START_MEM
270096
EXT
.php
DS
/
THINK_PATH
/home/www/sakura/thinkphp/
LIB_PATH
/home/www/sakura/thinkphp/library/
CORE_PATH
/home/www/sakura/thinkphp/library/think/
TRAIT_PATH
/home/www/sakura/thinkphp/library/traits/
EXTEND_PATH
/home/www/sakura/extend/
VENDOR_PATH
/home/www/sakura/vendor/
RUNTIME_PATH
/home/www/sakura/runtime/
LOG_PATH
/home/www/sakura/runtime/log/
CACHE_PATH
/home/www/sakura/runtime/cache/
TEMP_PATH
/home/www/sakura/runtime/temp/
CONF_PATH
/home/www/sakura/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/home/www/sakura/addons/
MAC_URL
http://www.maccms.la/
MAC_NAME
苹果CMS
MAC_PATH
/
MAC_MOB
0
MAC_ROOT_TEMPLATE
/home/www/sakura/template/mytheme/html/
MAC_PATH_TEMPLATE
/template/mytheme/
MAC_PATH_TPL
/template/mytheme/html/
MAC_PATH_ADS
/template/mytheme/ads/
MAC_PAGE_SP
-
MAC_PLAYER_SORT
1
MAC_ADDON_PATH
/home/www/sakura/addons/
MAC_ADDON_PATH_STATIC
/home/www/sakura/static/addons/