Last Comment Bug 441592 - DB connections not closing under mod_perl
: DB connections not closing under mod_perl
[only affects 3.0.x]
Product: Bugzilla
Classification: Server Software
Component: Database (show other bugs)
: unspecified
: All All
P1 major (vote)
: Bugzilla 3.0
Assigned To: Max Kanat-Alexander
: default-qa
: 449676 (view as bug list)
Depends on: 408766
  Show dependency treegraph
Reported: 2008-06-24 10:54 PDT by Denis Roy
Modified: 2008-12-11 14:32 PST (History)
3 users (show)
mkanat: approval3.0+
mkanat: blocking3.0.5+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

Looks good. r=dkl (636 bytes, patch)
2008-06-24 11:07 PDT, Max Kanat-Alexander
mkanat: review+
dkl: review+
Details | Diff | Splinter Review
process list of mysql (9.30 KB, text/plain)
2008-09-10 07:03 PDT, Peter
no flags Details
mod_perl diff & apache config (1.03 KB, text/plain)
2008-09-11 02:19 PDT, Peter
no flags Details

Description User image Denis Roy 2008-06-24 10:54:01 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080316 SUSE/ Firefox/
Build Identifier: R3.0.4

As discussed on, the Bugzilla 3.0 release/stable stream is missing this line in the Bugzilla::ModPerl::CleanupHandler


In CVS, with the rtag Bugzilla_Stable, BUGZILLA-3_0_4, BUGZILLA-3_0_3 and BUGZILLA-3_0-STABLE is, and that version does not call Bugzilla::_cleanup();

Anyone installing BZ from CVS, using any of those rtags and using mod_perl will likely have a problem with too many DB connections to the master.

The call to Bugzilla::_cleanup() appears in 1.6, which is rtagged BUGZILLA-3_1_1 (and BUGZILLA-3_1_2).

Reproducible: Always

Steps to Reproduce:
Comment 1 User image Max Kanat-Alexander 2008-06-24 10:57:20 PDT
This is essentially a regression of bug 408766. Or at the least, having Apache::DBI around hid this problem, because when you have persistent connections, you don't need to close them.
Comment 2 User image Max Kanat-Alexander 2008-06-24 11:07:08 PDT
Created attachment 326517 [details] [diff] [review]
Looks good.


Denis, could you tell me if this patch works?

And dkl, I just need a code review on this ridiculously small patch.
Comment 3 User image Denis Roy 2008-06-24 11:33:03 PDT
I tested the patch on R3.0.4 and my connection count went from 400+ to 30.   I'd set the review flag, but I'm not authorized to.
Comment 4 User image Max Kanat-Alexander 2008-06-24 11:40:27 PDT
Comment on attachment 326517 [details] [diff] [review]
Looks good.


Okay, I'm setting this for Denis.
Comment 5 User image Max Kanat-Alexander 2008-06-24 17:23:23 PDT
Checking in;
/cvsroot/mozilla/webtools/bugzilla/,v  <--
new revision:; previous revision:
Comment 6 User image Frédéric Buclin 2008-06-25 01:58:49 PDT
Don't forget to relnote this one when releasing 3.0.5. :)
Comment 7 User image Peter 2008-09-09 09:44:06 PDT
I experienced the same problem in 3.0.5. After using bugzilla for a while i get the "too many connections" error and have to restart mysql.

The changes in the patch provided for this bug are in the .

mysql: 5.0.18, for suse-linux (i686)
  maxconnection = 300

Webserver: apache2, keepalive off

Brwoser: Firefox 3.0.1

What other information could be helpful?
Comment 8 User image Max Kanat-Alexander 2008-09-09 16:03:39 PDT
(In reply to comment #7)
How many httpd children are there, at the time? Does Bugzilla display its version number as 3.0.5 on the home page?
Comment 9 User image Peter 2008-09-10 02:58:29 PDT
There are 8 httpd childen. The version shown on the home page is 3.0.5.
Comment 10 User image Max Kanat-Alexander 2008-09-10 03:09:27 PDT
Okay. When MySQL is locked up, can you get me the output of:


And attach it here as an attachment (not a comment)?
Comment 11 User image Peter 2008-09-10 07:03:54 PDT
Created attachment 337870 [details]
process list of mysql

maxconnections was not defined in my.cnf (-> default = 100) to produce the error faster. It also occurs with maxconnections=300
Comment 12 User image Max Kanat-Alexander 2008-09-10 16:59:18 PDT
Okay, can you go to the root of your Bugzilla installation and do a "cvs -q diff -Nu" and attach the results of that?
Comment 13 User image Peter 2008-09-11 02:19:27 PDT
Created attachment 338064 [details]
mod_perl diff & apache config

a colleague of me commented out the line with add_config, but added the whole thing directly in the apache config file
Comment 14 User image Max Kanat-Alexander 2008-09-11 02:29:33 PDT
Okay. If you're not using the config (which you're not, since you commented out that line), then your problem comes from that and we can't be held responsible in any way for anything that happens to your installation, including the fact that it's probably going to leak memory like mad.

So anyhow, your issue is not a bug in Bugzilla, and this bug is still validly FIXED.
Comment 15 User image Peter 2008-09-11 03:20:28 PDT
you are right. sorry for vasting your time.
Comment 16 User image Max Kanat-Alexander 2008-12-11 14:32:50 PST
*** Bug 449676 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.