Re: Mysql vs. Mysqli crash handling

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

 



On Monday 25 February 2008, Daniel Brown wrote:
> On Mon, Feb 25, 2008 at 3:07 PM, Larry Garfield <larry@xxxxxxxxxxxxxxxx> 
wrote:
> >  Hi folks.  I've an odd issue.
>
>     Only fair.  You're an odd bird, and we're an odd bunch.  ;-P
>
> >  If I connect to a MySQL DB using ext/mysql, and for whatever reason the
> > process dies (uncaught exception, fatal error, etc.) the connection is
> > garbage collected and closed.  If, however, I use ext/mysqli, the
> > connection remains open forever and just eats up resources, eventually
> > resulting in hitting the connection limit.  Same app, same database, same
> > server.
>
>     What version of PHP and MySQL (client extension and server) are you
> using?

Yeah, I should have mentioned that...

PHP 5.1.6, MySQL 5.0.48 (client and server I think; I'm not the sysadmin).

>     What do your mysqli_query() command and SQL query string look like?

I'll have to ask our sysadmin for the test scripts he ran.  (We're running the 
site on Drupal, which can handle either, but has a lot of DB abstraction 
involved.  He tested it sans-Drupal, but I am not sure what his scripts 
were.)

> >  Any idea why mysqli behaves that way, and how to make it clean up
> > properly?  (Yes I should of course try to avoid fatals in the first
> > place, but when they do happen I don't want them to bring the whole
> > server to its knees.)
>
>     I may not be able to help you, since I've only recently started
> switching myself over to mysqli (I know, as always I'm late to adopt),
> but with more information, maybe someone like Richard Lynch can come
> in and work a miracle.

Hi Rich! :-)

-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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