#19030 [Opn->Ana]: performance issues with mysql extension

From: Date: Fri, 23 Aug 2002 07:03:42 +0000
Subject: #19030 [Opn->Ana]: performance issues with mysql extension
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-17613@lists.php.net to get a copy of this message
ID: 19030 Updated by: georg@php.net Reported By: bob@bravenet.com -Status: Open +Status: Analyzed Bug Type: MySQL related Operating System: Any PHP Version: 4.2.2 -Assigned To: +Assigned To: georg Previous Comments: ------------------------------------------------------------------------ [2002-08-22 00:17:04] bob@bravenet.com I moved this to a bug category. As I gave it more thought I feel that the fact that mysql_stat causes logging and PHP's improper use of it to determine an active connection when other facilities (mysql_ping()) exist really is a bug. ------------------------------------------------------------------------ [2002-08-22 00:11:11] bob@bravenet.com When establishing a persistent connection, if PHP finds an existing connection it will do a mysql_stat() on the link that it found and then check the error for CR_SERVER_GONE_ERROR then reconnects on failure. I believe mysql's C API has a better function to do what is performed. The mysql_ping() api function will perform the same functionality at a lower cost in performance. The original host/port/user/pass information should be retained in the mysql link structure so that a failed mysql_ping() will reconnect automatically to the database server. This also removes the logging entry caused by a mysql status command. This does have an impact for sites with a higher load. Thanks for you consideration on this. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19030&edit=1

« previous php.bugs (#17613) next »