Home > Backend Development > PHP Tutorial > Set Mysql execution timeout

Set Mysql execution timeout

WBOY
Release: 2016-07-25 09:09:51
Original
1865 people have browsed it
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.

  1. $db->query("SET interactive_timeout = 3600;");
  2. $db->query("SET wait_timeout = 3600;");
  3. ?>
Copy Code


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template