I'm not sure closing the browser window sends the RST packet back to
the server, if it does, that's great! However, if php is waiting on
mysql to return a result, it wouldn't notice this anyway until mysql
finished processing and returned control back to the script. I could
be completly off-base
Even if it did, it would be by convention only, there is no guarantee. Not
only that, but it would likewise be dependent on the browser closing
normally, which is likewise no guarantee.
The fact of the matter here however is that there is NO set of behavior that
would suit everyone. I can
PHP will notice if the browser has disconnected when it tries to write
data. If it detects the browser has disconnected it will stop script
execution. You can control what php should do in the event of a
disconnect with the ignore_user_abort() function. See the connection
handling page for more
[snip]
I just noticed a horrible thing.
[/snip]
Keep in mind that the query event is server side and is not tied to the
browser (client side) once it has begun because of the statelessness of
the connection. You would have to have some sort of onClose() event from
the browser that would trigger
-Original Message-
From: Jay Blanchard [mailto:jblanch...@pocket.com]
Sent: Wednesday, June 03, 2009 8:46 AM
To: Daevid Vincent; mysql@lists.mysql.com
Subject: RE: Why doesn't mySQL stop a query when the browser tab is
closedL
[snip]
I just noticed a horrible thing.
[/snip]
Keep in
Hi Daevid,
You can always stop the query by running
SHOW PROCESSLIST;
from the command line or your MySql Admin tool. The above command will
show you all of the queries that are currently running along with
their PID# and state. Find the query your want to stop, and run the
following command
We have a NOC that displays this sort of thing and shows myTop in six
windows for DEV/TEST/PROD and Master/Slave for
each.(http://www.daevid.com/content/examples/snippets.php scroll down to
Automatic Monitoring of remote servers for a handy script)
So we do monitor this and will kill long running
my.cnf supports these timeout options
http://dev.mysql.com/doc/refman/5.1/en/mysql-options.html
connect-timeout=seconds
#innodb_lock_wait_timeout = 50
The timeout in seconds an InnoDB
transaction may wait for a row lock before giving up. The
default value is 50 seconds. A
It just seems odd to me that PHP does a mysql_connect and gets a resource
ID. Then it uses that socket (or whatever it is) to do subsequent queries.
Mysql has to know about it too in order for it to send back results to the
same resource/handle/socket/whatever. So either PHP should do some
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
10 matches
Mail list logo