Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10548 closed Patch - Bug Fix (fixed)

Too many DB connections open when expiring a large number of programs

Reported by: dlinvill@… Owned by: danielk
Priority: minor Milestone: 0.26
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

It appears that a new connection is opened and remains open for each program that is expired. I marked 80+ programs for deletion and 2 days later when the autoexpire started to automatically delete them the db connection count rapidly increased and started to report too many connections when close to the mysql limit of 100 set by mythbuntu.

I have attached around 3 hours of logs where you can see batches of the program expiring and the db connection count climbs from the usual ~30 to 100 and starts to error out. The connection only appear to close after 30 minutes or so.

Please attach all output as a file in bug reports. MythTV Version : v0.25-rc-126-g711386d MythTV Branch : master Network Protocol : 72 Library API : 0.25.20120315-2 QT Version : 4.6.2 Options compiled in:

linux profile use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_ceton using_hdpvr using_iptv using_ivtv using_joystick_menu using_libcrypto using_libdns_sd using_libxml2 using_lirc using_mheg using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_v4l2 using_v4l1 using_x11 using_xrandr using_xv using_bindings_perl using_bindings_python using_bindings_php using_mythtranscode using_opengl using_vdpau using_ffmpeg_threads using_live using_mheg using_libxml2

Attachments (2)

mythbackend.log (245.5 KB) - added by dlinvill@… 12 years ago.
backend log of expiring programs and db connection limit reached
10548-v1.patch (1.1 KB) - added by danielk 12 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by dlinvill@…

Attachment: mythbackend.log added

backend log of expiring programs and db connection limit reached

comment:1 Changed 12 years ago by beirdo

Owner: set to danielk
Status: newassigned

This is a serious issue. We should have some code in the DeleteThread? to limit the number of concurrent threads, perhaps? Assigning to danielk as he knows the intricacies of the db connections fairly well.

Changed 12 years ago by danielk

Attachment: 10548-v1.patch added

comment:2 Changed 12 years ago by danielk

Milestone: unknown0.26
Status: assignedaccepted
Type: Bug Report - GeneralPatch - Bug Fix

comment:3 Changed 12 years ago by Daniel Thor Kristjansson <dkristjansson@…>

Resolution: fixed
Status: acceptedclosed

In b60534bf4c7de8c0ca7ba44864a79b8e852c5244/mythtv:

Fixes #10548. Free DB connection while truncating for slow deletes.

comment:4 Changed 12 years ago by Daniel Thor Kristjansson <dkristjansson@…>

In fc980fa364d51aa504bdb1792f465b06e53ad91e/mythtv:

Fixes #10548. Free DB connection while truncating for slow deletes.

Note: See TracTickets for help on using tickets.