The database connection may time out when PHP performs data query or other operations in crontab. Use the following code to set the MySQL execution timeout.
$db->query("SET interactive_timeout = 3600;");
$db->query("SET wait_timeout = 3600;");
?>
Copy Code
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn