[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_channel`') in Query.php line 1921
  6. at Query->getTableInfo('fa_cms_channel', 'pk') in Query.php line 1955
  7. at Query->getPk(['table' => 'fa_cms_channel', 'where' => [], 'field' => '*', ...]) in Query.php line 2640
  8. at Query->find('404') in Model.php line 1708
  9. at Model::get('404') in Channel.php line 30
  10. at Channel->index()
  11. at call_user_func_array([object(Channel), 'index'], []) in Route.php line 78
  12. at Route->execute('cms', 'channel', 'index')
  13. at ReflectionMethod->invokeArgs(object(Route), ['cms', 'channel', 'index']) in App.php line 343
  14. at App::invokeMethod(['\think\addons\Route', 'execute'], ['diyname' => '404', 'addon' => 'cms', 'controller' => 'channel', ...]) in App.php line 470
  15. at App::exec(['type' => 'method', 'method' => ['\think\addons\Route', 'execute'], 'var' => ['addon' => 'cms', 'controller' => 'channel', 'action' => 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  16. at App::run() in start.php line 19
  17. at require('/home/www/wwwroot/ww...') in index.php line 24

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_ACCEPT
*/*
HTTP_HOST
ycsfjw.com
PATH_INFO
/404.html
REDIRECT_STATUS
200
SERVER_NAME
www.ycsfjw.com
SERVER_PORT
80
SERVER_ADDR
127.0.0.1
REMOTE_PORT
52914
REMOTE_ADDR
127.0.0.1
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.ycsfjw.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/404.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/404.html
SCRIPT_FILENAME
/home/www/wwwroot/www.ycsfjw.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711615544.63
REQUEST_TIME
1711615544
Environment Variables
empty

ThinkPHP Constants

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