In the error reporting scenario, the command command of tp6 + nohup of Linux is used to execute the continuous script
error reason: the connection to the database will be disconnected for a long time
Detailed error information is as follows
[think\exception\ErrorException]
Error while sending STMT_PREPARE packet. PID=29294
PHP Fatal error: Uncaught think\exception\ErrorException: Error while sending STMT_CLOSE packet. PID=29294 in /....../vendor/topthink/think-orm/src/db/PDOConnection.php:603
Stack trace:
#0 /....../vendor/topthink/think-orm/src/db/PDOConnection.php(603): think\initializer\Error->appError(2, 'Error while sen...', '/...', 603, Array)
#1 /....../topthink/think-orm/src/db/PDOConnection.php(1576): think\db\PDOConnection->free()
#2 /....../vendor/topthink/think-orm/src/db/Connection.php(345): think\db\PDOConnection->close()
#3 [internal function]: think\db\Connection->__destruct()
#4 {main}
thrown in /....../vendor/topthink/think-orm/src/db/PDOConnection.php on line 603
Solution:
Modify the database configuration file database.php and set it to true to enable disconnect and reconnect
// whether to disconnect and reconnect
'break_reconnect' => true,
Read More:
- [PHP] Array to string conversion error when sending data in post
- [Solved] PHP Fatal error: Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes
- Workman Run Error: stream_socket_server() has been disabled for security reasons
- [Solved] tp6.0 open_basedir Error: Warning: require(): open_basedir restriction in effect.
- Laravel-admin php artisan admin:install error reporting problem solution
- [Solved] PHPMailer Failed to Send Email: SMTP Error: Could not connect to SMTP host.
- [Solved] Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path:
- [Solved] WordPress Upgrade PHP 5.6 to 7.x Fatal error: Uncaught Error: Call to undefined function mysql_connect()
- [Solved] PHPMailer Error: SMTP ERROR: Failed to connect to server: (0)
- PHP error in Windows: class’ mysqli ‘not found
- Tp6 Cannot enable error [How to Solve]
- PHP large file upload error 413: request entity too large [How to Solve]
- [Solved] PHP Error: Warning: file_get_contents(): Failed to enable crypto
- [Solved] Fatal error: Class ‘think\Container‘ not found & [InvalidArgumentException] Could not find package
- /www/server/php/56/sbin/php-fpm:error while loading shared libraries:libssl.so.1.0. 0:cannot open shared object file:No such file or directory
- How to Solve phpExcel Error: ERR_INVALID_RESPONSE
- [Solved] TP5 Post receive array error: variable type error: array
- [Solved] Laravel Upload Files Verificate Error: The file failed to upload.
- nginx.conf php-fpm.conf and php.ini Error among the three_ Differences and relations between log instructions
- Unserialize(): cause analysis and solution of error at offset