Why doesn't mySQL stop a query when the browser tab is closedL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I just noticed a horrible thing. 
 
I have a query (report) that can take 15 minutes or more to generate with
mySQL. We have > 500 Million rows. This used to be done in real time when we
had less rows, but recently we got a big dump of data that shot it up.
 
So, noticing via myTop the query taking so long, I closed my web page tab.
The query did NOT go away! WTF? So mysqld continued to peg the CPU at 75% to
135% (yes, top shows that if you have quad cpus. *sigh*)
 
Is there some way to force this to work sanely? Some php.ini or my.cnf file
that has a setting to abort queries when the web page has gone away?
 
Not sure which mailing list this belongs on so I'll post to both PHP and
mySQL. Although it feels this is a PHP problem as it should know that the
Apache thread went away and therefore close the mySQL connection and kill
the query. Conversely, mysql should know that it's connection (via PHP) went
away and should equally abort. So you're both wrong! :)

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux