[axxs-sysadmin] the overload/mysql problem - maybe php persistent connections is the problem?

Sebastian aotearoa at kodeaffe.de
Fri May 25 04:46:41 UTC 2007


kia ora koutou...

* boud <boud at riseup.net> [2007-05-24 10:24 +1200]:
> 
> www.axxs has been given connection timed out since around 10:00 UTC+0 Wed,
> i.e. early evening in Oceania, which makes sense, since that's the time
> when most people are likely to access it. That makes about 14 hours' down
> time (so far).
> 
> If anyone manages to get into the system in the next few hours or so,
> i suggest you set mysql.persistent_connections = Off in /etc/php.ini
> and restart mysqld and the webserver without waiting for any more
> comments from people doing individual sites.  This might break some
> functionality in some sites, but when the server is inaccessible for
> over 50% of the time, that's a pretty severe loss of functionality
> anyway.

i grepped through the sources of AIMC (running dada) and could not find
the string pconnect. so we should be fine with turning it off.

cheers,
 Sebastian

> On Wed, 23 May 2007, boud wrote:
> >
> > Please check your php code for calls to  pconnect - this is for "persistent
> > connections" to databases, especially the mysql database. While this may
> > sound like a good thing in principle, it seems that the issue is not that
> > simple and that unless you access databases on another server, you probably
> > don't need them. i'm just paraphrasing what i read, i'm not an expert on
> > the issue.  Some people who know more than me wrote these pages:
> >
> > http://www.thescripts.com/forum/thread532966.html
> > http://de3.php.net/manual/en/features.persistent-connections.php
> > http://drupal.org/node/42626
> >
> >
> > However, it does seem like persistent connections were causing major
> > blockages on www.axxs.org - for the past many, many weeks. We should
> > wait a few days to see if the problem really has been fixed - at the
> > moment we're just limiting the number of persistent connections to 30.
> >
> > But if nobody needs them, we might want to turn them off totally.
> >
> > If you replace   pconnect   by   connect  in your php code, that should
> > (probably) be enough.
> >
> > Anyway, please check if you use them or if you need to use them and
> > speak up if you need persistent connections or if you already have a problem
> > with the limiting of pconnections to 30.
> >
> >
> > Hoping that this hypothesis about the excesive load problems is the
> > right one...
> >
> > The 15-min running average load has been stable at about 1-1.5 over
> > the past 5 hours according to my analysis (/tmp/uptime_cron.log):
> >
> > https://samizdat.axxs.org/150
> >
> > while during the past few weeks at least the 5 minute average load
> > frequently got up through 40, 50, even up to 90 which was generally
> > when the system got 99.9% stuck.
> >
> > Anyway, let's see...
> >
> >
> >> ---------- Forwarded message ----------
> >> Date: Wed, 23 May 2007 08:26:31 +1000
> >> From: aketus
> >
> >> Cheers for looking into this boud - it's been a problem for a long time.
> >>
> >> I'll check my sites' files for pconnects and I think I'll also migrate them to
> >> borg tonight.
> >>
> >> For those running Drupal sites, read this:
> >> http://drupal.org/node/42626
> >>
> >> It appears that the relevant code would be in /includes/database.mysql.inc and
> >> I think that pconnect is not the default. Worthwhile checking anyway
> >>
> >> aketus
> >>
> >>
> >>
> >> Quoting boud <boud at riseup.net>:
> >>
> >>> hi all
> >>>
> >>> php/mysql persistent links may be a problem.
> >
> >
> >>> Does anyone really need persistent links? It seems that it's only
> >>> useful if you're using databases on other servers, and even then, you
> >>> need to be careful with them.

[...]

-- 
 _   ascii ribbon campaign     .oOo.   GCSd-s:+aC++ULB+++W++M+PS+++Y+
( )
 X   Fnord is why Lisp has so many parentheses
/ \  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.indymedia.org/pipermail/axxs-sysadmin/attachments/20070525/0093e35c/attachment.pgp 


More information about the axxs-sysadmin mailing list