Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 2 years ago

Closed 22 months ago

Last modified 22 months 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@… 2 years ago.
backend log of expiring programs and db connection limit reached
10548-v1.patch (1.1 KB) - added by danielk 22 months ago.

Download all attachments as: .zip

Change History (6)

Changed 2 years ago by dlinvill@…

backend log of expiring programs and db connection limit reached

comment:1 Changed 22 months ago by beirdo

  • Owner set to danielk
  • Status changed from new to assigned

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 22 months ago by danielk

comment:2 Changed 22 months ago by danielk

  • Milestone changed from unknown to 0.26
  • Status changed from assigned to accepted
  • Type changed from Bug Report - General to Patch - Bug Fix

comment:3 Changed 22 months ago by Daniel Thor Kristjansson <dkristjansson@…>

  • Resolution set to fixed
  • Status changed from accepted to closed

In b60534bf4c7de8c0ca7ba44864a79b8e852c5244/mythtv:

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

comment:4 Changed 22 months ago by Daniel Thor Kristjansson <dkristjansson@…>

In fc980fa364d51aa504bdb1792f465b06e53ad91e/mythtv:

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.