Home > General > MythTV settings reset due to database problems

MythTV settings reset due to database problems

September 17, 2012 Leave a comment Go to comments

A couple of days ago I started getting wrong language EIT data – and therefore a lot of missed recordings (because the program titles had changed). This seemed very strange, because I had been getting correct EIT language data for over two months since the setup.

I then started investigating a bit more and noticed that ‘ISO639Language0’ and ‘ISO639Language1’ settings had been reset back to ‘eng’ (from ‘fin’). This seemed strange, so I started digging in my DB backups and was able to pinpoint a date when this reset had occurred. Then I looked at mythconverg.logging and found these entries:

mysql> select distinct message from logging where message like '%savesetting%';
+---------------------------------------------------------------+
| message                                                       |
+---------------------------------------------------------------+
| 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             |
+---------------------------------------------------------------+

I then looked at the timestamp for those messages and looked at my mythbackend logs and found a bunch of these messages a few seconds later:

2012-09-14 18:00:43.237945 E [20573/17377] HttpServer245 mythdbcon.cpp:213 (OpenDatabase) - Unable to connect to database!
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, what seems to have happened here is that mythtv was unable to connect to the database, so it somehow reset those values and they were eventually stored in the database, silently overriding the real configuration. This can be a quite nasty bug, with big unknown consequences.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s