Closed Bug 538705 Opened 12 years ago Closed 12 years ago
Bugzilla->dbh will become invalid in long jobqueue
In a CGI script, DBI automatically reconnects to the database if it's disconnected. In a command-line script, it doesn't--you have to specify an attribute for the database to make this happen. So in long-running jobqueue.pl runs, if something were to access the database, it would fail. I think that our current jobs don't do this, but I ran into it with a customization, at least. I really thought that I already filed and fixed this, but I guess not.
Technically I don't need review on this (since I'm the module owner) but I wanted to get a second opinion on the fact that Pg seems to not need/support a similar attribute. Also, Xiaoou--does Oracle need anything like this to automatically reconnect during long-running processes?
Assignee: database → mkanat
Status: NEW → ASSIGNED
Attachment #420853 - Flags: review?(LpSolit)
Comment on attachment 420853 [details] [diff] [review] v1 >+ mysql_auto_reconnect => 1, From what I can read at http://dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html, this has the side-effect to roll back transactions (and to release table locks, which we fortunately don't use anymore), and last_insert_id() is also reset. Is that what we want?
(In reply to comment #2) > From what I can read at > http://dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html, this has the > side-effect to roll back transactions (and to release table locks, which we > fortunately don't use anymore), and last_insert_id() is also reset. Is that > what we want? Yes. If you think about it, this is fine. The auto reconnect is only intended for idle timeouts, and is already on by default in CGI apps.
(In reply to comment #1) > Also, Xiaoou--does Oracle need anything like this to automatically reconnect > during long-running processes? I am afraid not.
(In reply to comment #4) > I am afraid not. Okay. So are you saying that it needs it and doesn't have it, or that it doesn't need it?
(In reply to comment #6) > Yeah. Yeah to which one?
Checking in Bugzilla/DB/Mysql.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm,v <-- Mysql.pm new revision: 1.80; previous revision: 1.79 done
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
This should have gone back on to the branch for 3.4, because this bug essentially means that jobqueue.pl stops working after a certain amount of time, if people have a connection timeout specified in MySQL.
Target Milestone: Bugzilla 3.6 → Bugzilla 3.4
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/3.4/ modified Bugzilla/DB/Mysql.pm Committed revision 6749.
You need to log in before you can comment on or make changes to this bug.