Opened 6 years ago

Last modified 5 years ago

#11096 new Bug Report - General

Settings might be silently reset if DB is unavailable

Reported by: anonymous@… Owned by:
Priority: minor Milestone: unknown
Component: MythTV - General Version: 0.25.2
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I noticed that some of my settings (most critically 'ISO639Language0' and 'ISO639Language1') had been reset back to 'eng' (from 'fin'). I started digging in my DB backups and was able to pinpoint a day when this happened. I then found the following entries in the mythconverg.logging table:

| SaveSettingOnHost?('FreqTable?') - No database yet |

| SaveSettingOnHost?('ISO639Language0') - No database yet |

| SaveSettingOnHost?('ISO639Language1') - No database yet |

| SaveSettingOnHost?('TVFormat') - No database yet |

| SaveSettingOnHost?('VbiFormat?') - No database yet |

| SaveSettingOnHost?('prefDupMethod') - No database yet |

| SaveSettingOnHost?('Country') - No database yet |

| SaveSettingOnHost?('DateFormat?') - No database yet |

| SaveSettingOnHost?('EnableMHEG') - No database yet |

| SaveSettingOnHost?('Language') - No database yet |

| SaveSettingOnHost?('MythArchiveVideoFormat?') - No database yet |

| SaveSettingOnHost?('ShortDateFormat?') - No database yet |

| SaveSettingOnHost?('TimeFormat?') - No database yet |

In mythbackend log I found a bunch of DB connection issues (a few seconds later than the logs above):

2012-09-14 18:00:43.237956 E [20573/17377] HttpServer245 mythdbcon.cpp:214 (OpenDatabase?) - Driver error was [1/1040]: QMYSQL: Unable to connect Database error was: Too many connections

2012-09-14 18:00:43.238098 I [20573/17386] HttpServer281 mythdbcon.cpp:808 (prepare) - MySQL server disconnected

So, it seems that due to the DB connection problems, mythtv reset some of my settings back to their default setting.

Proper behavior would be to not override DB settings with default values.

In this case, this had quite bad consequences, because I started getting EIT data in the wrong language - thus a lot of recordings based on title were missed.

Change History (4)

comment:1 Changed 5 years ago by tiainen@…

I can confirm that this bug exists also in MythTV Version : 0.26.0-1.fc17 (v0.26.0-28-ge3087dd). Settings keep resetting from 'fin' to 'eng'.

comment:2 in reply to:  1 Changed 5 years ago by tiainen@…

Replying to tiainen@…:

I can confirm that this bug exists also in MythTV Version : 0.26.0-1.fc17 (v0.26.0-28-ge3087dd). Settings keep resetting from 'fin' to 'eng'.

The problem is severe, because it means that many of the TV programs in Finland are then stored in our second official language, Swedish.

comment:3 Changed 5 years ago by Gary Buhrmaster <gary.buhrmaster@…>

What is your max_connections value in your mysql my.cnf file? Starting with I think 0.25(ish) the number of connections used could end up being higher than your current setting, or the defaults (100 in some versions of mysql). Try increasing the value of max_connections to something like 250 (or perhaps higher) to minimize the likelihood of running into this issue. Note that you can change the value on the fly for the current session by issuing a 'set global max_connections = 250;' in the mysql cli. But you still need to change the value in my.cnf for the next startup. To see the current value you can issue the command 'select @@max_connections;' from the mysql cli.

comment:4 Changed 5 years ago by tiainen@…

We had +-------------------+ | @@max_connections | +-------------------+ | 151 | +-------------------+

But shouldn't this be fixed in MythTV code instead of bumping the connections count up? Our configuration has mysql on a different server than the mythbackend, which may cause these connection issues when connection is lost to the mysql server for any reason... We also seem to have lots of DB errors in mythbackend logs.

Note: See TracTickets for help on using tickets.