Note: There are a few cases of duplicates in user autocompletion which are being worked on.

DB connections not closing under mod_perl

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Database
P1
major
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Denis Roy, Assigned: Max Kanat-Alexander)

Tracking

unspecified
Bugzilla 3.0
Bug Flags:
approval3.0 +
blocking3.0.5 +

Details

(Whiteboard: [only affects 3.0.x])

Attachments

(3 attachments)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080316 SUSE/2.0.0.13-0.2 Firefox/2.0.0.13
Build Identifier: R3.0.4

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

Bugzilla::_cleanup();


In CVS, mod_perl.pl with the rtag Bugzilla_Stable, BUGZILLA-3_0_4, BUGZILLA-3_0_3 and BUGZILLA-3_0-STABLE is 1.5.2.2, 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 mod_perl.pl 1.6, which is rtagged BUGZILLA-3_1_1 (and BUGZILLA-3_1_2).

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
(Assignee)

Comment 1

9 years ago
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.
Assignee: database → mkanat
Severity: normal → major
Status: UNCONFIRMED → NEW
Depends on: 408766
Ever confirmed: true
Flags: blocking3.0.5+
Priority: -- → P1
Whiteboard: [only affects 3.0.x]
Target Milestone: --- → Bugzilla 3.0
(Assignee)

Comment 2

9 years ago
Created attachment 326517 [details] [diff] [review]
Looks good.

r=dkl

Denis, could you tell me if this patch works?

And dkl, I just need a code review on this ridiculously small patch.
Attachment #326517 - Flags: review?(webmaster)
Attachment #326517 - Flags: review?(dkl)
(Reporter)

Comment 3

9 years ago
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.
(Assignee)

Comment 4

9 years ago
Comment on attachment 326517 [details] [diff] [review]
Looks good.

r=dkl

Okay, I'm setting this for Denis.
Attachment #326517 - Flags: review?(webmaster) → review+

Updated

9 years ago
Attachment #326517 - Attachment description: v1 → Looks good. r=dkl
Attachment #326517 - Flags: review?(dkl) → review+
(Assignee)

Comment 5

9 years ago
Checking in mod_perl.pl;
/cvsroot/mozilla/webtools/bugzilla/mod_perl.pl,v  <--  mod_perl.pl
new revision: 1.5.2.3; previous revision: 1.5.2.2
done
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Flags: approval3.0+
Resolution: --- → FIXED

Comment 6

9 years ago
Don't forget to relnote this one when releasing 3.0.5. :)

Comment 7

9 years ago
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 mod_perl.pl .

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

Webserver: apache2, keepalive off
  mod_perl

Brwoser: Firefox 3.0.1

What other information could be helpful?
(Assignee)

Comment 8

9 years ago
(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

9 years ago
There are 8 httpd childen. The version shown on the home page is 3.0.5.
(Assignee)

Comment 10

9 years ago
Okay. When MySQL is locked up, can you get me the output of:

SHOW FULL PROCESSLIST;

And attach it here as an attachment (not a comment)?

Comment 11

9 years ago
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
(Assignee)

Comment 12

9 years ago
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

9 years ago
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
(Assignee)

Comment 14

9 years ago
Okay. If you're not using the mod_perl.pl 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

9 years ago
you are right. sorry for vasting your time.
(Assignee)

Updated

9 years ago
Duplicate of this bug: 449676
You need to log in before you can comment on or make changes to this bug.