Is there a way to force Mysql from PHP to kill the request if it has not returned within a certain period of time?
Sometimes I see expensive requests that work for several hours (obviously, by this time the timeout for the HTTP connection or user has expired). As soon as the number of such requests accumulates, they begin to adversely affect the overall performance.
Long requests are a sign of poor design. It is best to check the questions of interest and how they can be optimized. It just ignores the problem.
, SHOW PROCESSESLIST . KILL x, . PHP script, . , , PHP, .
: - upstart.
upstart
DAEMONS , cron.script, xyz time .
DAEMONS
xyz time
// this instruction kills all processes executing for more than 10 seconds SELECT CONCAT('KILL ',id,';') FROM INFORMATION_SCHEMA.PROCESSLIST WHERE state = "executing" AND `time` >= 10
, ... , .
, , -. , , , .
Source: https://habr.com/ru/post/1760841/More articles:Clojure 1.2 released! How to get swank-clojure to use this? - emacshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1760837/migrating-from-cs-rcs-to-mercurial&usg=ALkJrhi5Q5oOrnyfyxiKPn5W8pUtEnyP-QIs it recommended to use ASP.NET user management system on a high traffic website - c #Qt on OS X creating 10.5 compatible application on 10.6 - qtSearch table Fast sigmoid function - javaregex pattern to match alternating subpatterns - phpCreating a REST service - restSuperfish popup menu not working in IE7 - jqueryCLLocationManager - странный утечка памяти - memory-leaksEffective drawing of 2D sprites (bitmaps) - c #All Articles