There are specific messages about the MySQL-PHP connection time using mysql.connect_timeout. I want to know if this timeout is set from PHP only when initially connecting to MySQL or is it valid for a specific database query?
My thing is that I have a page with connecting to MySQL at the top, and then I do 3-4 queries to MySQL one by one. The 1st and 2nd requests are completed in just 1-2 seconds to execute when the third request takes 20 seconds. Now that the third request takes more than 20 seconds, I want to call a timeout. So, the question is that setting this time from PHP is applicable to the initial connection to the database or applicable to each subsequent request (independently). If so, how can I set it to timeout after 20 seconds for the third request?
kb0000
source share