[2] ErrorException in Connection.php line 376

PDOStatement::execute(): MySQL server has gone away

  1. // 是否为存储过程调用
  2. $procedure = in_array(strtolower(substr(trim($sql), 0, 4)), ['call', 'exec']);
  3. // 参数绑定
  4. if ($procedure) {
  5. $this->bindParam($bind);
  6. } else {
  7. $this->bindValue($bind);
  8. }
  9. // 执行查询
  10. $this->PDOStatement->execute();
  11. // 调试结束
  12. $this->debug(false, '', $master);
  13. // 返回结果集
  14. return $this->getResult($pdo, $procedure);
  15. } catch (\PDOException $e) {
  16. if ($this->isBreak($e)) {
  17. return $this->close()->query($sql, $bind, $master, $pdo);
  18. }
  19. throw new PDOException($e, $this->config, $this->getLastsql());

Call Stack

  1. in Connection.php line 376
  2. at Error::appError(2, 'PDOStatement::execut...', '/home/www/wwwroot/ww...', 376, ['sql' => 'SHOW COLUMNS FROM `f...', 'bind' => [], 'master' => false, ...])
  3. at PDOStatement->execute() in Connection.php line 376
  4. at Connection->query('SHOW COLUMNS FROM `f...', [], false, true) in Mysql.php line 65
  5. at Mysql->getFields('`fa_cms_archives`') in Query.php line 1921
  6. at Query->getTableInfo('fa_cms_archives', 'type') in Query.php line 1969
  7. at Query->getFieldsType('fa_cms_archives') in Query.php line 1975
  8. at Query->getFieldsBind('fa_cms_archives') in Builder.php line 270
  9. at Builder->buildWhere(['AND' => ['status' => 'normal', 'deletetime' => ['exp', object(Expression)]]], ['soft_delete' => ['__TABLE__.deletetime', ['null', '']], 'via' => '', 'with' => ['channel'], ...]) in Builder.php line 240
  10. at Builder->parseWhere(['AND' => ['status' => 'normal', 'deletetime' => ['exp', object(Expression)]]], ['soft_delete' => ['__TABLE__.deletetime', ['null', '']], 'via' => '', 'with' => ['channel'], ...]) in Builder.php line 725
  11. at Builder->select(['soft_delete' => ['__TABLE__.deletetime', ['null', '']], 'via' => '', 'with' => ['channel'], ...]) in Query.php line 2512
  12. at Query->select() in Query.php line 1487
  13. at Query->paginate('10', true, ['type' => '\addons\cms\library\...', 'var_page' => 'page', 'list_rows' => 15, ...]) in Archives.php line 500
  14. at Archives::getArchivesList(['cache' => false, 'paginate' => '10,true,page']) in Index.php line 35
  15. at Index->index()
  16. at call_user_func_array([object(Index), 'index'], []) in Route.php line 78
  17. at Route->execute('cms', 'index', 'index')
  18. at ReflectionMethod->invokeArgs(object(Route), ['cms', 'index', 'index']) in App.php line 343
  19. at App::invokeMethod(['\think\addons\Route', 'execute'], ['addon' => 'cms', 'controller' => 'index', 'action' => 'index']) in App.php line 470
  20. at App::exec(['type' => 'method', 'method' => ['\think\addons\Route', 'execute'], 'var' => ['addon' => 'cms', 'controller' => 'index', 'action' => 'index']], ['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/www/wwwroot/ww...') in index.php line 60

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
www.98297.net
HTTP_REFERER
http://www.98297.net/du/98/70722.html
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
www.98297.net
SERVER_PORT
80
SERVER_ADDR
154.7.7.197
REMOTE_PORT
34696
REMOTE_ADDR
54.225.1.66
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/home/www/wwwroot/www.98297.net/public
DOCUMENT_URI
/index.php
REQUEST_URI
/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/home/www/wwwroot/www.98297.net/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710826673.5784
REQUEST_TIME
1710826673
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/www/wwwroot/www.98297.net/public/../application/
THINK_VERSION
5.0.25
THINK_START_TIME
1710826673.5801
THINK_START_MEM
418184
EXT
.php
DS
/
THINK_PATH
/home/www/wwwroot/www.98297.net/thinkphp/
LIB_PATH
/home/www/wwwroot/www.98297.net/thinkphp/library/
CORE_PATH
/home/www/wwwroot/www.98297.net/thinkphp/library/think/
TRAIT_PATH
/home/www/wwwroot/www.98297.net/thinkphp/library/traits/
ROOT_PATH
/home/www/wwwroot/www.98297.net/
EXTEND_PATH
/home/www/wwwroot/www.98297.net/extend/
VENDOR_PATH
/home/www/wwwroot/www.98297.net/vendor/
RUNTIME_PATH
/home/www/wwwroot/www.98297.net/runtime/
LOG_PATH
/home/www/wwwroot/www.98297.net/runtime/log/
CACHE_PATH
/home/www/wwwroot/www.98297.net/runtime/cache/
TEMP_PATH
/home/www/wwwroot/www.98297.net/runtime/temp/
CONF_PATH
/home/www/wwwroot/www.98297.net/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
ADDON_PATH
/home/www/wwwroot/www.98297.net/addons/