6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
10/20/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#8671] Nag::listAlarms fails when called from the scripts/alarms.php cron job
*
Your Email Address
*
Spam protection
Enter the letters below:
. ,.__ .__ .___.__ \./ [__)[__)[__ | \ | [__)| [___|__/
Comment
>> That doesn't make any sense because we use DB::connect() in the SQL >> driver which already is a singleton. Besides that we only have a >> single DB instance, the DB package also takes care of re-using open >> database connections. > > I added a print statement to connect and disconnect functions in > DB/mysqli.php and called alarm cron job. It looks like DB connect > get's called 2071 times (mostly from nag) without a single > disconnect. And I would expect this as Nag::listAlarms gets called > with a list of ~2000 users and for each user it calls > Nag_Driver::singleton($user). Since the $user is part of the instance > signature, it creates a new Nag_Driver_sql instance for each user. > And I don't see it trying to reuse existing connections in DB.php or > DB/mysqli.php. I think you can reproduce this just by creating > kronolith and nag alarms for a large number of users.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers