[1040] PDOException in Connection.php line 293

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 293
  2. at PDO->__construct('mysql:host=127.0.0.1...', 'ygxlsmall', 'ygxlsmall', [0, 2, 0, ...]) in Connection.php line 293
  3. at Connection->connect() in Connection.php line 998
  4. at Connection->initConnect(false) in Connection.php line 347
  5. at Connection->query('SHOW COLUMNS FROM `t...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('`tp_config`') in Query.php line 1749
  7. at Query->getTableInfo('tp_config', 'type') in Query.php line 1797
  8. at Query->getFieldsType('tp_config') in Query.php line 1803
  9. at Query->getFieldsBind('tp_config') in Builder.php line 263
  10. at Builder->buildWhere(['AND' => ['inc_type' => ['eq', 'shop_info']]], ['multi' => ['AND' => ['inc_type' => [['eq', 'shop_info']]]], 'where' => ['AND' => ['inc_type' => ['eq', 'shop_info']]], 'table' => 'tp_config', ...]) in Builder.php line 233
  11. at Builder->parseWhere(['AND' => ['inc_type' => ['eq', 'shop_info']]], ['multi' => ['AND' => ['inc_type' => [['eq', 'shop_info']]]], 'where' => ['AND' => ['inc_type' => ['eq', 'shop_info']]], 'table' => 'tp_config', ...]) in Builder.php line 697
  12. at Builder->select(['multi' => ['AND' => ['inc_type' => [['eq', 'shop_info']]]], 'where' => ['AND' => ['inc_type' => ['eq', 'shop_info']]], 'table' => 'tp_config', ...]) in Query.php line 2332
  13. at Query->select() in common.php line 557
  14. at tpCache('shop_info') in Controller.php line 68
  15. at Controller->__construct() in Base.php line 65
  16. at Base->__construct()
  17. at ReflectionClass->newInstanceArgs([]) in App.php line 362
  18. at App::invokeClass('app\home\controller\...') in Loader.php line 459
  19. at Loader::controller('Index', 'controller', false, 'Error') in App.php line 579
  20. at App::module(['home', 'Index', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 459
  21. at App::exec(['type' => 'module', 'module' => ['home', 'Index', 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 142
  22. at App::run() in start.php line 19
  23. at require('/www/wwwroot/ygxlsma...') in index.php line 62

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.ygxlsmall.com
PATH_INFO
/home/Index/index.html
REDIRECT_STATUS
200
SERVER_NAME
www.ygxlsmall.com
SERVER_PORT
443
SERVER_ADDR
172.24.196.208
REMOTE_PORT
43469
REMOTE_ADDR
18.222.163.31
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/ygxlsmall.com
DOCUMENT_URI
/index.php/home/Index/index.html
REQUEST_URI
/index.php/home/Index/index.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/www/wwwroot/ygxlsmall.com/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/home/Index/index.html
REQUEST_TIME_FLOAT
1713457129.201
REQUEST_TIME
1713457129
Environment Variables
empty

ThinkPHP Constants

IS_SAAS
0
SAAS_BASE_USER
0
PLUGIN_PATH
/www/wwwroot/ygxlsmall.com/plugins/
UPLOAD_PATH
public/upload/
TPSHOP_CACHE_TIME
1
SITE_URL
https://www.ygxlsmall.com
HTTP
https
INSTALL_DATE
1463741583
SERIALNUMBER
20160520065303oCWIoa
APP_PATH
/www/wwwroot/ygxlsmall.com/application/
NOW_TIME
1713457129
THINK_VERSION
5.0.15
THINK_START_TIME
1713457129.2015
THINK_START_MEM
413664
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/ygxlsmall.com/thinkphp/
LIB_PATH
/www/wwwroot/ygxlsmall.com/thinkphp/library/
CORE_PATH
/www/wwwroot/ygxlsmall.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/ygxlsmall.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/ygxlsmall.com/
EXTEND_PATH
/www/wwwroot/ygxlsmall.com/extend/
VENDOR_PATH
/www/wwwroot/ygxlsmall.com/vendor/
RUNTIME_PATH
/www/wwwroot/ygxlsmall.com/runtime/
LOG_PATH
/www/wwwroot/ygxlsmall.com/runtime/log/
CACHE_PATH
/www/wwwroot/ygxlsmall.com/runtime/cache/
TEMP_PATH
/www/wwwroot/ygxlsmall.com/runtime/temp/
CONF_PATH
/www/wwwroot/ygxlsmall.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/www/wwwroot/ygxlsmall.com/addons/
EXTEND_MODULE
1
EXTEND_ANDROID
2
EXTEND_IOS
3
EXTEND_ENTRUST
4
EXTEND_MINIAPP
5
EXTEND_H5
6
TIME_MOUTH
4
IS_AJAX
false
IS_GET
true
IS_POST
false
MODULE_NAME
home
CONTROLLER_NAME
Index
ACTION_NAME
index
PREFIX
tp_