Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Username log filter causes database lock when a database exception is raised #1705

Closed
ManuelW77 opened this issue Apr 4, 2022 · 45 comments
Closed

Comments

@ManuelW77
Copy link

ManuelW77 commented Apr 4, 2022

Describe the Bug

I have tautulli in a docker container on a raspberry running.
It runs smooth for a while, but after round about a day it stops responding with this message in log.
After restarting the docker container it runs for a while again.

2022-04-03 20:13:57 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Global notification conditions evaluated to 'True'.
2022-04-03 20:13:57 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Looking up The Movie Database info for themoviedb_id '656704'.
2022-04-03 20:13:58 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Checking custom notification conditions for notifier_id 5.
2022-04-03 20:13:58 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: {1} user | is not | 'manuelw' > 'manuelw' > False
2022-04-03 20:13:58 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Condition logic [blank]: {1} > False
2022-04-03 20:13:58 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Custom conditions evaluated to 'False'. Conditions: [False].
2022-04-03 20:13:58 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Custom notification conditions not satisfied, skipping notifier_id 5.
2022-04-03 20:24:41 - INFO :: ThreadPoolExecutor-2_0 : Retrieving latest version information from GitHub
2022-04-03 20:24:41 - DEBUG :: ThreadPoolExecutor-2_0 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-03 20:24:42 - DEBUG :: ThreadPoolExecutor-2_0 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-03 20:24:42 - INFO :: ThreadPoolExecutor-2_0 : Tautulli is up to date
2022-04-03 21:24:41 - INFO :: ThreadPoolExecutor-2_1 : Retrieving latest version information from GitHub
2022-04-03 21:24:41 - DEBUG :: ThreadPoolExecutor-2_1 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-03 21:24:42 - INFO :: ThreadPoolExecutor-2_2 : Tautulli Config :: Writing configuration to file
2022-04-03 21:24:42 - DEBUG :: ThreadPoolExecutor-2_1 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-03 21:24:42 - INFO :: ThreadPoolExecutor-2_3 : Tautulli PlexTV :: Requesting resources for server...
2022-04-03 21:24:42 - DEBUG :: ThreadPoolExecutor-2_0 : Tautulli Database :: Successfully backed up /config/tautulli.db to tautulli.backup-20220403212442.sched.db
2022-04-03 21:24:42 - INFO :: ThreadPoolExecutor-2_4 : Tautulli Users :: Requesting users list refresh...
2022-04-03 21:24:42 - INFO :: ThreadPoolExecutor-2_1 : Tautulli is up to date
2022-04-03 21:24:42 - INFO :: ThreadPoolExecutor-2_5 : Tautulli Libraries :: Requesting libraries list refresh...
2022-04-03 21:24:42 - DEBUG :: ThreadPoolExecutor-2_2 : Tautulli Config :: Successfully backed up /config/config.ini to config.backup-20220403212441.sched.ini
2022-04-03 21:24:43 - DEBUG :: ThreadPoolExecutor-2_3 : Tautulli PlexTV :: Plex Pass subscription not found.
2022-04-03 21:24:43 - INFO :: ThreadPoolExecutor-2_3 : Tautulli Config :: Writing configuration to file
2022-04-03 21:24:44 - INFO :: ThreadPoolExecutor-2_5 : Tautulli Config :: Writing configuration to file
2022-04-03 21:24:44 - INFO :: ThreadPoolExecutor-2_4 : Tautulli Users :: Users list refreshed.
2022-04-03 21:24:44 - INFO :: ThreadPoolExecutor-2_3 : Tautulli PlexTV :: Using user-defined URL.
2022-04-03 21:24:44 - INFO :: ThreadPoolExecutor-2_5 : Tautulli Libraries :: Libraries list refreshed.
2022-04-03 21:24:44 - INFO :: ThreadPoolExecutor-2_3 : Tautulli PlexTV :: Selected server: PlexServer (http://192.168.1.5:32400) (Linux - Version 1.25.8.5663-e071c3d62)
2022-04-03 21:24:44 - INFO :: ThreadPoolExecutor-2_3 : Tautulli Config :: Writing configuration to file
2022-04-03 21:38:39 - DEBUG :: Thread-15 : Tautulli ActivityHandler :: Session 33 watched.
2022-04-03 21:49:57 - DEBUG :: Thread-15 : Tautulli ActivityHandler :: Session 33 stopped.
2022-04-03 21:49:57 - DEBUG :: Thread-15 : Tautulli ActivityProcessor :: Fetching metadata for item ratingKey 29045
2022-04-03 21:49:57 - DEBUG :: Thread-15 : Tautulli ActivityHandler :: Removing sessionKey 33 ratingKey 29045 from session queue
2022-04-03 21:50:21 - DEBUG :: Thread-15 : Tautulli ActivityHandler :: Session 34 started by user 1210089 (Ma********r) with ratingKey 29040 (Billie Eilish at Austin City Limits).
2022-04-03 21:50:22 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Notifiers enabled for notify_action 'on_play'.
2022-04-03 21:50:22 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Checking global notification conditions.
2022-04-03 21:50:22 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Global notification conditions evaluated to 'True'.
2022-04-03 21:50:22 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Looking up The Movie Database info for themoviedb_id '656696'.
2022-04-03 21:50:22 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Checking custom notification conditions for notifier_id 5.
2022-04-03 21:50:23 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: {1} user | is not | 'manuelw' > 'manuelw' > False
2022-04-03 21:50:23 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Condition logic [blank]: {1} > False
2022-04-03 21:50:23 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Custom conditions evaluated to 'False'. Conditions: [False].
2022-04-03 21:50:23 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Custom notification conditions not satisfied, skipping notifier_id 5.
2022-04-03 22:24:28 - DEBUG :: Thread-15 : Tautulli ActivityHandler :: Session 34 stopped.
2022-04-03 22:24:28 - DEBUG :: Thread-15 : Tautulli ActivityProcessor :: Fetching metadata for item ratingKey 29040
2022-04-03 22:24:28 - DEBUG :: Thread-15 : Tautulli ActivityHandler :: Removing sessionKey 34 ratingKey 29040 from session queue
2022-04-03 22:24:41 - INFO :: ThreadPoolExecutor-2_0 : Retrieving latest version information from GitHub
2022-04-03 22:24:41 - DEBUG :: ThreadPoolExecutor-2_0 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-03 22:24:42 - DEBUG :: ThreadPoolExecutor-2_0 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-03 22:24:42 - INFO :: ThreadPoolExecutor-2_0 : Tautulli is up to date
2022-04-03 23:24:41 - INFO :: ThreadPoolExecutor-2_2 : Retrieving latest version information from GitHub
2022-04-03 23:24:41 - DEBUG :: ThreadPoolExecutor-2_2 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-03 23:24:41 - DEBUG :: ThreadPoolExecutor-2_2 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-03 23:24:42 - INFO :: ThreadPoolExecutor-2_2 : Tautulli is up to date
2022-04-04 00:24:41 - INFO :: ThreadPoolExecutor-2_5 : Retrieving latest version information from GitHub
2022-04-04 00:24:41 - DEBUG :: ThreadPoolExecutor-2_5 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-04 00:24:42 - DEBUG :: ThreadPoolExecutor-2_5 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-04 00:24:42 - INFO :: ThreadPoolExecutor-2_5 : Tautulli is up to date
2022-04-04 01:24:41 - INFO :: ThreadPoolExecutor-2_1 : Retrieving latest version information from GitHub
2022-04-04 01:24:41 - DEBUG :: ThreadPoolExecutor-2_1 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-04 01:24:42 - DEBUG :: ThreadPoolExecutor-2_1 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-04 01:24:42 - INFO :: ThreadPoolExecutor-2_1 : Tautulli is up to date
2022-04-04 02:24:41 - INFO :: ThreadPoolExecutor-2_4 : Retrieving latest version information from GitHub
2022-04-04 02:24:41 - DEBUG :: ThreadPoolExecutor-2_4 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-04 02:24:42 - DEBUG :: ThreadPoolExecutor-2_4 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-04 02:24:42 - INFO :: ThreadPoolExecutor-2_4 : Tautulli is up to date
2022-04-04 03:24:41 - INFO :: ThreadPoolExecutor-2_3 : Retrieving latest version information from GitHub
2022-04-04 03:24:41 - DEBUG :: ThreadPoolExecutor-2_3 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-04 03:24:41 - INFO :: ThreadPoolExecutor-2_2 : Tautulli Config :: Writing configuration to file
2022-04-04 03:24:42 - DEBUG :: ThreadPoolExecutor-2_3 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-04 03:24:42 - DEBUG :: ThreadPoolExecutor-2_0 : Tautulli Database :: Successfully backed up /config/tautulli.db to tautulli.backup-20220404032442.sched.db
2022-04-04 03:24:42 - DEBUG :: ThreadPoolExecutor-2_2 : Tautulli Config :: Successfully backed up /config/config.ini to config.backup-20220404032441.sched.ini
2022-04-04 03:24:42 - INFO :: ThreadPoolExecutor-2_3 : Tautulli is up to date
2022-04-04 04:24:41 - INFO :: ThreadPoolExecutor-2_5 : Retrieving latest version information from GitHub
2022-04-04 04:24:41 - DEBUG :: ThreadPoolExecutor-2_5 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-04 04:24:41 - DEBUG :: ThreadPoolExecutor-2_5 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-04 04:24:42 - INFO :: ThreadPoolExecutor-2_5 : Tautulli is up to date
2022-04-04 05:24:41 - INFO :: ThreadPoolExecutor-2_4 : Retrieving latest version information from GitHub
2022-04-04 05:24:41 - DEBUG :: ThreadPoolExecutor-2_4 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-04 05:24:42 - DEBUG :: ThreadPoolExecutor-2_4 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-04 05:24:42 - INFO :: ThreadPoolExecutor-2_4 : Tautulli is up to date
2022-04-04 06:24:41 - INFO :: ThreadPoolExecutor-2_2 : Retrieving latest version information from GitHub
2022-04-04 06:24:41 - DEBUG :: ThreadPoolExecutor-2_2 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-04 06:24:42 - DEBUG :: ThreadPoolExecutor-2_2 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-04 06:24:42 - INFO :: ThreadPoolExecutor-2_2 : Tautulli is up to date
2022-04-04 07:24:41 - INFO :: ThreadPoolExecutor-2_1 : Retrieving latest version information from GitHub
2022-04-04 07:24:41 - DEBUG :: ThreadPoolExecutor-2_1 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-04 07:24:42 - DEBUG :: ThreadPoolExecutor-2_1 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-04 07:24:42 - INFO :: ThreadPoolExecutor-2_1 : Tautulli is up to date
2022-04-04 08:24:41 - INFO :: ThreadPoolExecutor-2_0 : Retrieving latest version information from GitHub
2022-04-04 08:24:41 - DEBUG :: ThreadPoolExecutor-2_0 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-04 08:24:42 - DEBUG :: ThreadPoolExecutor-2_0 : Latest version is 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
2022-04-04 08:24:42 - INFO :: ThreadPoolExecutor-2_0 : Tautulli is up to date
2022-04-04 09:24:41 - INFO :: ThreadPoolExecutor-2_3 : Retrieving latest version information from GitHub
2022-04-04 09:24:41 - DEBUG :: ThreadPoolExecutor-2_3 : Requesting URL via GET method: https://api.github.com/repos/Tautulli/Tautulli/commits/master
2022-04-04 09:24:41 - INFO :: ThreadPoolExecutor-2_5 : Tautulli Database :: Vacuuming database.
Execution of job "check_update (trigger: interval[1:00:00], next run at: 2022-04-04 10:24:41 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "check_update (trigger: interval[1:00:00], next run at: 2022-04-04 11:24:41 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "check_update (trigger: interval[1:00:00], next run at: 2022-04-04 12:24:41 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "check_update (trigger: interval[1:00:00], next run at: 2022-04-04 13:24:41 UTC)" skipped: maximum number of running instances reached (1)

Steps to Reproduce

no steps, its doing by itself

Expected Behavior

running smoothly :)

Screenshots

No response

Relevant Settings

latest docker container: tautulli/tautulli:latest

Git Branch: master
Git Commit Hash: 9a4ca69
Configuration File: /config/config.ini
Database File: /config/tautulli.db | Status
Log File: /config/logs/tautulli.log
Backup Directory: /config/backups
Cache Directory: /config/cache
Export Directory: /config/exports
Newsletter Directory: /config/newsletters
Arguments: ['--datadir', '/config']
Platform: [Docker] Linux 5.10.103-v7+ (#1529 SMP Tue Mar 8 12:21:37 GMT 2022 - Debian GNU/Linux 11 bullseye)
System Timezone: UTC (UTC+0000)
Python Version: 3.9.10 (main, Jan 29 2022, 08:34:32) [GCC 10.2.1 20210110]

Git Branch: master
Git Commit Hash: 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
Configuration File: /config/config.ini
Database File: /config/tautulli.db | Status
Log File: /config/logs/tautulli.log
Backup Directory: /config/backups
Cache Directory: /config/cache
Export Directory: /config/exports
Newsletter Directory: /config/newsletters
Arguments: ['--datadir', '/config']
Platform: [Docker] Linux 5.10.103-v7+ (#1529 SMP Tue Mar 8 12:21:37 GMT 2022 - Debian GNU/Linux 11 bullseye)
System Timezone: UTC (UTC+0000)
Python Version: 3.9.10 (main, Jan 29 2022, 08:34:32) [GCC 10.2.1 20210110]

Tautulli Version

V2.9.5

Git Branch

master

Git Commit Hash

9a4ca69

Platform and Version

Docker

Python Version

3.9.10

Browser and Version

every Browser

Link to Logs

https://gist.github.com/ManuelW77/1c5f712f1b627dd2852d60946eff24c0

@JonnyWong16
Copy link
Contributor

Someone else has this issue over on Discord, but we were never able to figure out what causes it.

It seems to be failing somewhere in the update check. Can you change the update check interval back to the default of 6 hours or even increase it to 24 hours?

@ManuelW77
Copy link
Author

Thanks for answer.

ok, i set the interval up to 24h. I'll see if it helps.

@tronyx
Copy link

tronyx commented Apr 4, 2022

Mine was set to 1h, which I don't remember doing, but I've set it to 24h. I'll let you know what I see.

@ManuelW77
Copy link
Author

Yes, mine was set to 1h too, and i don't did it.

@SuberSeb
Copy link

SuberSeb commented Apr 5, 2022

I have similar issue. I'm running Tautulli in Docker on Unraid with x86 CPU.

Since I'm running Tautulli in Docker, I will completely disable update check.

@SuberSeb
Copy link

SuberSeb commented Apr 5, 2022

Since I'm running Tautulli in Docker, I will completely disable update check.

I have disabled update check, but Tautilli is still hangs.

Logs:

2022-04-05 08:18:45 - DEBUG :: ('CP Server Thread-7',) : Tautulli Pmsconnect :: No library data.
2022-04-05 08:18:45 - DEBUG :: ('CP Server Thread-7',) : Tautulli Pmsconnect :: No library data.
2022-04-05 09:18:45 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 09:18:45 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 09:18:46 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 10:18:45 - DEBUG :: ('CP Server Thread-5',) : Tautulli Pmsconnect :: No library data.
2022-04-05 10:18:46 - DEBUG :: ('CP Server Thread-5',) : Tautulli Pmsconnect :: No library data.
2022-04-05 10:18:46 - DEBUG :: ('CP Server Thread-5',) : Tautulli Pmsconnect :: No library data.
2022-04-05 10:19:02 - INFO :: ThreadPoolExecutor-2_1 : Tautulli Config :: Writing configuration to file
2022-04-05 10:19:27 - DEBUG :: ThreadPoolExecutor-2_1 : Tautulli Config :: Successfully backed up /config/config.ini to config.backup-20220405101902.sched.ini
2022-04-05 10:19:27 - DEBUG :: ThreadPoolExecutor-2_0 : Tautulli Database :: Successfully backed up /config/tautulli.db to tautulli.backup-20220405101905.sched.db
2022-04-05 11:18:46 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 11:18:46 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 11:18:46 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 12:18:46 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 12:18:47 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 12:18:47 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 13:18:47 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 13:18:47 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 13:18:48 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 13:19:02 - INFO :: ThreadPoolExecutor-2_0 : Tautulli Config :: Writing configuration to file
2022-04-05 13:19:24 - DEBUG :: ThreadPoolExecutor-2_0 : Tautulli Config :: Successfully backed up /config/config.ini to config.backup-20220405131902.sched.ini
2022-04-05 13:19:25 - DEBUG :: ThreadPoolExecutor-2_2 : Tautulli Database :: Successfully backed up /config/tautulli.db to tautulli.backup-20220405131903.sched.db
2022-04-05 14:18:47 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 14:18:48 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 14:18:48 - DEBUG :: ('CP Server Thread-9',) : Tautulli Pmsconnect :: No library data.
2022-04-05 15:18:48 - DEBUG :: ('CP Server Thread-13',) : Tautulli Pmsconnect :: No library data.
2022-04-05 15:18:48 - DEBUG :: ('CP Server Thread-13',) : Tautulli Pmsconnect :: No library data.
2022-04-05 15:18:49 - DEBUG :: ('CP Server Thread-13',) : Tautulli Pmsconnect :: No library data.
2022-04-05 16:18:49 - DEBUG :: ('CP Server Thread-14',) : Tautulli Pmsconnect :: No library data.
2022-04-05 16:18:49 - DEBUG :: ('CP Server Thread-14',) : Tautulli Pmsconnect :: No library data.
2022-04-05 16:18:49 - DEBUG :: ('CP Server Thread-14',) : Tautulli Pmsconnect :: No library data.
2022-04-05 16:19:02 - INFO :: ThreadPoolExecutor-2_2 : Tautulli Config :: Writing configuration to file
2022-04-05 16:19:02 - INFO :: ThreadPoolExecutor-2_0 : Tautulli PlexTV :: Requesting resources for server...
2022-04-05 16:19:02 - INFO :: ThreadPoolExecutor-2_3 : Tautulli Users :: Requesting users list refresh...
2022-04-05 16:19:02 - INFO :: ThreadPoolExecutor-2_4 : Tautulli Libraries :: Requesting libraries list refresh...
2022-04-05 16:19:03 - INFO :: ThreadPoolExecutor-2_0 : Tautulli Config :: Writing configuration to file
2022-04-05 16:19:03 - INFO :: ThreadPoolExecutor-2_0 : Tautulli PlexTV :: Server URL retrieved.
2022-04-05 16:19:03 - INFO :: ThreadPoolExecutor-2_0 : Tautulli PlexTV :: Selected server: UNRAID () (Linux - Version 1.25.8.5663-e071c3d62)
2022-04-05 16:19:03 - INFO :: ThreadPoolExecutor-2_0 : Tautulli Config :: Writing configuration to file
2022-04-05 16:19:03 - DEBUG :: ThreadPoolExecutor-2_4 : Tautulli Pmsconnect :: No library data.```

@JonnyWong16
Copy link
Contributor

It has nothing to do with the update check. So I'm back to having no idea what is causing it.

@tronyx
Copy link

tronyx commented Apr 5, 2022

Is there any additional kind of logging or anything that we can enable to help troubleshoot?

@SuberSeb
Copy link

SuberSeb commented Apr 6, 2022

I think this is started after latest update to 2.9.5. Before that I have not any problem with Tautulli.

@mariusjellum
Copy link

mariusjellum commented Apr 6, 2022

I have the same problem, but it seems I also can trigger the problem by browsing the play history. Once I hit the play history the GUI hangs at "fetching rows" and the terminal outputs
2022-04-06 05:39:11 - WARNING :: ('CP Server Thread-7',) : Failed to get image /library/metadata/58129/art, falling back to art.

If I don't touch the GUI Tautulli goes unresponsive after a while with the folling messages in the terminal:

Execution of job "make_backup (trigger: interval[6:00:00], next run at: 2022-04-06 02:31:31 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "make_backup (trigger: interval[6:00:00], next run at: 2022-04-06 02:31:31 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "check_update (trigger: interval[1:00:00], next run at: 2022-04-06 03:31:31 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "check_update (trigger: interval[1:00:00], next run at: 2022-04-06 04:31:31 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "check_update (trigger: interval[1:00:00], next run at: 2022-04-06 05:31:31 UTC)" skipped: maximum number of running instances reached (1)

Problem started arising around 2.9.4(docker container), have been running for years without a single hickup before that.

Git Branch: master
Git Commit Hash: 9a4ca69
Configuration File: /config/config.ini
Database File: /config/tautulli.db | Status
Log File: /config/logs/tautulli.log
Backup Directory: /config/backups
Cache Directory: /config/cache
Export Directory: /config/exports
Newsletter Directory: /config/newsletters
Arguments: ['--datadir', '/config']
Platform: [Docker] Linux 5.10.60-qnap (#1 SMP Sat Jan 29 01:44:37 CST 2022 - Debian GNU/Linux 11 bullseye)
System Timezone: UTC (UTC+0000)
Python Version: 3.9.10 (main, Jan 29 2022, 04:19:45) [GCC 10.2.1 20210110]

Git Branch: master
Git Commit Hash: 9a4ca69590bacbbc5ec0076e078b9e38aea85e35
Configuration File: [/config/config.ini]
Database File: [/config/tautulli.db]
Log File: [/config/logs/tautulli.log]
Backup Directory: /config/backups
Cache Directory: /config/cache
Export Directory: /config/exports
Newsletter Directory: /config/newsletters
Arguments: ['--datadir', '/config']
Platform: [Docker] Linux 5.10.60-qnap (#1 SMP Sat Jan 29 01:44:37 CST 2022 - Debian GNU/Linux 11 bullseye)
System Timezone: UTC (UTC+0000)
Python Version: 3.9.10 (main, Jan 29 2022, 04:19:45) [GCC 10.2.1 20210110]

@JonnyWong16
Copy link
Contributor

If you are going to contribute to this issue then you need to provide all the info in the issues template. Saying "me too" does not contribute to identifying the issue at all.

  • Tautulli Version
  • Git Branch
  • Git Commit Hash
  • Platform and Version
  • Python Version
  • Browser and Version
  • Link to Logs

@SuberSeb
Copy link

SuberSeb commented Apr 6, 2022

Tautulli Version: 2.9.5
Git Branch: master
Git Commit Hash: v2.9.5
Platform and Version: linuxserver/tautulli:latest
Python Version: 3.9.7 (default, Nov 24 2021, 21:15:59) [GCC 10.3.1 20211027]
Browser and Version: Firefox 99
Link to Logs: Posted early

@ManuelW77
Copy link
Author

I have to say, for me, since i set the update check interval to 24h, the problem is gone now for 2 days.
I'll see what happens next days.

@tronyx
Copy link

tronyx commented Apr 6, 2022

Tautulli Version: 2.9.5
Git Branch: beta
Git Commit Hash: 9a4ca69
Platform and Version: Docker - tautulli/tautulli:beta
Python Version: 3.9.10 (main, Jan 29 2022, 04:19:45) [GCC 10.2.1 20210110]
Browser and Version: Firefox 99 && Chrome 100.0.4896.75

@SuberSeb
Copy link

SuberSeb commented Apr 7, 2022

Although completely disabling of update checking isn't help at all, set interval to 24h seems to be a working solution. Got almost 48 hours of uptime, it's record for now.

@ManuelW77
Copy link
Author

Set to 24h isn't the solution. I runs for 2 days and then it stops working again.

@ManuelW77
Copy link
Author

My workaround for now:

  • set update check to 24h
  • crontab to restart the container every night

@Shasoosh
Copy link

Apparently it hang 3 weeks ago with "skipped: maximum number of running instances reached" but I just noticed yesterday.
I guess there's no way to salvage that 3 weeks of data right?

Tautulli Version: 2.9.5
Git Branch: master
Git Commit Hash: v2.9.5
Platform and Version: linuxserver/tautulli:latest
Python Version: 3.9.7
Browser and Version: Chrome Version 100.0.4896.88 (Official Build) (64-bit)

@SuberSeb
Copy link

My workaround for now:

  • set update check to 24h
  • crontab to restart the container every night

I have the same settings - update check set to 24h, container restarting every night (docker backups). Tautulli still hangs, but much less often.

@19wolf
Copy link

19wolf commented Apr 22, 2022

Same issue for me, running from docker (lscr.io/linuxserver/tautulli:latest)

Git Branch: | master
-- | --
Git Commit Hash: | v2.9.7
Configuration File: | /config/config.ini
Database File: | /config/tautulli.db \| Status
Log File: | /config/logs/tautulli.log
Backup Directory: | /config/backups
Cache Directory: | /config/cache
Export Directory: | /config/exports
Newsletter Directory: | /config/newsletters
Arguments: | ['--datadir', '/config']
Platform: | [Docker] Linux 5.15.30-Unraid (#1 SMP Sat Mar 19 08:42:03 PDT 2022)
System Timezone: | America/New_York (UTC-0400)
Python Version: | 3.9.7 (default, Nov 24 2021, 21:15:59) [GCC 10.3.1 20211027]

Git Branch:	[master](https://nullreferer.com/?https://github.com/Tautulli/Tautulli/tree/master)
Git Commit Hash:	[v2.9.7](https://nullreferer.com/?https://github.com/Tautulli/Tautulli/commit/v2.9.7)
Configuration File:	[/config/config.ini](https://tautulli.ericwolf.me/download_config)
Database File:	[/config/tautulli.db](https://tautulli.ericwolf.me/download_database) | [Status](https://tautulli.ericwolf.me/status/database)
Log File:	[/config/logs/tautulli.log](https://tautulli.ericwolf.me/download_log)
Backup Directory:	/config/backups
Cache Directory:	/config/cache
Export Directory:	/config/exports
Newsletter Directory:	/config/newsletters
Arguments:	['--datadir', '/config']
Platform:	[Docker] Linux 5.15.30-Unraid (#1 SMP Sat Mar 19 08:42:03 PDT 2022)
System Timezone:	America/New_York (UTC-0400)
Python Version:	3.9.7 (default, Nov 24 2021, 21:15:59) [GCC 10.3.1 20211027]

@SuberSeb
Copy link

@JonnyWong16 any update on this? After latest update it got much worse - Tautulli hangs 3-4 times a day, setting update check interval to 24h isn't helping at all.

I'm using Tautulli for more than 4 years, this is the only issue that I have. Is there are additional steps which we can follow to help you determine and fix issue?

@JonnyWong16
Copy link
Contributor

I still have absolutely no idea.

@SuberSeb
Copy link

This is started after v2.9.5 update. Is there are something that can cause this? Some kind of race condition, thread problems, etc.

@JonnyWong16
Copy link
Contributor

Try the following tests.

Test 1: New Tautulli database with existing settings.

  • Create a completely new Tautulli container, go through the setup wizard, then import your configuration file. Don't touch anything else.

Test 2: Existing Tautulli database with default settings.

  • Create a completely new Tautulli container, go through the setup wizard, then import your existing database. Don't touch anything else.

Test 3: New Tautulli database and default settings.

  • Create a completely new Tautulli container, go through the setup wizard, then don't touch anything else.

This might help narrow down if it is a specific setting or database issue.

@NGDM

This comment was marked as off-topic.

@JonnyWong16

This comment was marked as off-topic.

@peterbysh
Copy link

Hi,

This happens on all our new Tautulli installations, any update on this ?

@JonnyWong16
Copy link
Contributor

No one has responded to my suggested tests from 3 weeks ago.

@cybersteel8
Copy link

Hi all. I found this thread for what might be a related reason. I have noticed that this hanging happens pretty much consistently when I am doing a mass import. If I get a whole new show, and I import them season by season, eventually Tautulli just craps out. I have a pastebin of the logs while Tautulli is unresponsive and it was in the middle of adding heaps of episodes.

Here are the logs themselves:
https://pastebin.com/pVhEd1mq

I am also using Docker, running on Unraid 6.10.1

@samwiseg0
Copy link
Contributor

Hi all. I found this thread for what might be a related reason. I have noticed that this hanging happens pretty much consistently when I am doing a mass import. If I get a whole new show, and I import them season by season, eventually Tautulli just craps out. I have a pastebin of the logs while Tautulli is unresponsive and it was in the middle of adding heaps of episodes.

Here are the logs themselves:

https://pastebin.com/pVhEd1mq

I am also using Docker, running on Unraid 6.10.1

Can you perform the tests that swift outlined?

#1705 (comment)

@pjj74
Copy link

pjj74 commented Jun 13, 2022

Try the following tests.

Test 1: New Tautulli database with existing settings.

  • Create a completely new Tautulli container, go through the setup wizard, then import your configuration file. Don't touch anything else.

Test 2: Existing Tautulli database with default settings.

  • Create a completely new Tautulli container, go through the setup wizard, then import your existing database. Don't touch anything else.

Test 3: New Tautulli database and default settings.

  • Create a completely new Tautulli container, go through the setup wizard, then don't touch anything else.

This might help narrow down if it is a specific setting or database issue.

Hi,

I performed your tests and Test 1 & Test 3 containers have not crashed but Test 2 container (existing database with default settings) has crashed in the same way as before. Logs from this container here - https://pastebin.com/DQGE4FPE

@JonnyWong16
Copy link
Contributor

Thanks for testing.

Can you try repairing your database and testing again? Go through the steps in this FAQ even if it says your database isn't corrupted.

https://github.com/Tautulli/Tautulli/wiki/Frequently-Asked-Questions#the-long-way

@pjj74
Copy link

pjj74 commented Jun 13, 2022

Ok, I've done that. Will let you know how it goes.

@tronyx
Copy link

tronyx commented Jun 14, 2022

I am going to make a copy of my DB and try the repair as well. Will let you know how it goes.

@JonnyWong16
Copy link
Contributor

Also for Test 2, does it make a difference if you import your database using the "Merge" method vs the "Overwrite" method?

@pjj74
Copy link

pjj74 commented Jun 14, 2022

Also for Test 2, does it make a difference if you import your database using the "Merge" method vs the "Overwrite" method?

I've created another instance using "Overwrite" and will monitor.

@pjj74
Copy link

pjj74 commented Jun 15, 2022

The Test 2 with the imported database using "Merge" has crashed in the same way (I think). Logs here

https://pastebin.com/khcuQ2at

The "Overwrite" imported database instance is currently still up, will continue to monitor.

Test 1 and Test 3 instances still running OK.

@tronyx
Copy link

tronyx commented Jun 15, 2022

The repair of the DB seems to have helped. My Tautulli container ran for a little over 15 hours before my daily backup script ran. Will see how it continues to run today.

@pjj74
Copy link

pjj74 commented Jun 15, 2022

The Test 2 "Overwrite" container has crashed.

Logs here

https://pastebin.com/BSfqRaUb

@tronyx
Copy link

tronyx commented Jun 19, 2022

Just wanted to report that, after the DP repair, everything seems to be working as expected and the container is now running as it was before the issue started.

@cybersteel8
Copy link

cybersteel8 commented Jun 25, 2022

This is happening every time a collection of episodes are added. I'm going to run the database repair steps detailed here and see what happens. The result is that Tautulli completely hangs and stops responding or working. Highly annoying 😆
https://github.com/Tautulli/Tautulli/wiki/Frequently-Asked-Questions#the-long-way
Unfortunately the link to the Linux/SQL Command Line steps does not work, so I'll be copying the database to my Windows machine and attempting the steps there.

2022-06-25 07:36:21 - DEBUG :: ThreadPoolExecutor-0_0 : Added 1 items to the recently_added database table.
2022-06-25 07:36:21 - DEBUG :: ThreadPoolExecutor-0_0 : Tautulli TimelineHandler :: Library item 'Man vs Bee - Chapter 3' (55690) added to Plex.
2022-06-25 07:36:21 - DEBUG :: ThreadPoolExecutor-0_0 : Added 1 items to the recently_added database table.
2022-06-25 07:36:21 - DEBUG :: ThreadPoolExecutor-0_0 : Tautulli TimelineHandler :: Library item 'Man vs Bee - Chapter 4' (55691) added to Plex.
2022-06-25 07:36:21 - DEBUG :: ThreadPoolExecutor-0_0 : Added 1 items to the recently_added database table.
2022-06-25 07:36:21 - DEBUG :: ThreadPoolExecutor-0_0 : Tautulli TimelineHandler :: Library item 'Man vs Bee - Chapter 5' (55692) added to Plex.
Execution of job "refresh_users (trigger: interval[1:00:00], next run at: 2022-06-24 23:28:56 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "refresh_libraries (trigger: interval[1:00:00], next run at: 2022-06-24 23:28:56 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "refresh_users (trigger: interval[1:00:00], next run at: 2022-06-25 00:28:56 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "refresh_libraries (trigger: interval[1:00:00], next run at: 2022-06-25 00:28:56 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "refresh_users (trigger: interval[1:00:00], next run at: 2022-06-25 01:28:56 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "refresh_libraries (trigger: interval[1:00:00], next run at: 2022-06-25 01:28:56 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "refresh_users (trigger: interval[1:00:00], next run at: 2022-06-25 02:28:56 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "refresh_libraries (trigger: interval[1:00:00], next run at: 2022-06-25 02:28:56 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "refresh_users (trigger: interval[1:00:00], next run at: 2022-06-25 03:28:56 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "refresh_libraries (trigger: interval[1:00:00], next run at: 2022-06-25 03:28:56 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "refresh_users (trigger: interval[1:00:00], next run at: 2022-06-25 04:28:56 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "refresh_libraries (trigger: interval[1:00:00], next run at: 2022-06-25 04:28:56 UTC)" skipped: maximum number of running instances reached (1)

@darthShadow
Copy link

darthShadow commented Jul 18, 2022

Have been facing the same issue for the past week so decided to spend some time this past weekend on figuring out the cause.

gdb proved pretty useful to dump the backtraces of all threads when the python process got stuck. It did need me to switch to my own image since neither the linuxserver image nor the official image (since it's the slim version, rather than the full version) have the required python gdb script that helps gdb decode the python symbols.

The actual issue is the logging which causes a deadlock when UsernameFiltering is enabled.

The specific deadlock happened here:

logger.error("Tautulli Database :: Fatal Error executing %s :: %s", query, e)
, which calls the logging filter for username here:
users.Users().get_users(),
, which in turn calls a DB query here:
result = monitor_db.select(query=query)
, which needs the DB lock that hasn't been released before calling the logger, thus resulting in a deadlock.

Disabling the username filtering stopped the lockups and allowed me to figure out the cause of the fatal errors, which were happening due to duplicate inserts in the DB, probably due to episodes from the same show getting processed by different threads:

TVMaze Duplicate
2022-07-16 01:39:58 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Notifiers enabled for notify_action 'on_created'.
2022-07-16 01:39:58 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Checking global notification conditions.
2022-07-16 01:39:58 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Global notification conditions evaluated to 'True'.
2022-07-16 01:39:58 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Looking up The Movie Database info for themoviedb_id '202503'.
2022-07-16 01:39:58 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Looking up TVmaze info for thetvdb_id '420695'.
2022-07-16 01:39:58 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Notifiers enabled for notify_action 'on_created'.
2022-07-16 01:39:58 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Checking global notification conditions.
2022-07-16 01:39:58 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Global notification conditions evaluated to 'True'.
2022-07-16 01:39:58 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Looking up TVmaze info for thetvdb_id '420695'.
2022-07-16 01:39:59 - ERROR :: Thread-2 : Tautulli Database :: Fatal Error executing INSERT INTO tvmaze_lookup (rating_key, thetvdb_id, imdb_id, tvmaze_url, tvmaze_json, tvmaze_id) VALUES (?, ?, ?, ?, ?, ?) :: UNIQUE constraint failed: tvmaze_lookup.rating_key
2022-07-16 01:39:59 - INFO :: Thread-2 : Tautulli Database :: Queries failed: UPDATE tvmaze_lookup SET rating_key = ?, thetvdb_id = ?, imdb_id = ?, tvmaze_url = ?, tvmaze_json = ? WHERE tvmaze_id = ? and INSERT INTO tvmaze_lookup (rating_key, thetvdb_id, imdb_id, tvmaze_url, tvmaze_json, tvmaze_id) VALUES (?, ?, ?, ?, ?, ?)
TMDB Duplicate
2022-07-16 11:22:31 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Notifiers enabled for notify_action 'on_created'.
2022-07-16 11:22:31 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Checking global notification conditions.
2022-07-16 11:22:31 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Global notification conditions evaluated to 'True'.
2022-07-16 11:22:31 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Looking up The Movie Database info for themoviedb_id '104987'.
2022-07-16 11:22:31 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Notifiers enabled for notify_action 'on_created'.
2022-07-16 11:22:31 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Checking global notification conditions.
2022-07-16 11:22:31 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Global notification conditions evaluated to 'True'.
2022-07-16 11:22:31 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Looking up The Movie Database info for themoviedb_id '104987'.
2022-07-16 11:22:31 - ERROR :: Thread-3 : Tautulli Database :: Fatal Error executing INSERT INTO themoviedb_lookup (rating_key, imdb_id, themoviedb_url, themoviedb_json, themoviedb_id) VALUES (?, ?, ?, ?, ?) :: UNIQUE constraint failed: themoviedb_lookup.rating_key
2022-07-16 11:22:31 - INFO :: Thread-3 : Tautulli Database :: Queries failed: UPDATE themoviedb_lookup SET rating_key = ?, imdb_id = ?, themoviedb_url = ?, themoviedb_json = ? WHERE themoviedb_id = ? and INSERT INTO themoviedb_lookup (rating_key, imdb_id, themoviedb_url, themoviedb_json, themoviedb_id) VALUES (?, ?, ?, ?, ?)
Image Hash Duplicate
2022-07-17 13:24:47 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Notifiers enabled for notify_action 'on_created'.
2022-07-17 13:24:47 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Checking global notification conditions.
2022-07-17 13:24:47 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Global notification conditions evaluated to 'True'.
2022-07-17 13:24:47 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Looking up The Movie Database info for themoviedb_id '6763'.
2022-07-17 13:24:47 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Notifiers enabled for notify_action 'on_created'.
2022-07-17 13:24:47 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Checking global notification conditions.
2022-07-17 13:24:47 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Global notification conditions evaluated to 'True'.
2022-07-17 13:24:47 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Looking up The Movie Database info for themoviedb_id '6763'.
2022-07-17 13:24:48 - ERROR :: Thread-2 : Tautulli Database :: Fatal Error executing INSERT INTO image_hash_lookup (img, rating_key, width, height, opacity, background, blur, fallback, img_hash) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) :: UNIQUE constraint failed: image_hash_lookup.img_hash
2022-07-17 13:24:48 - INFO :: Thread-2 : Tautulli Database :: Queries failed: UPDATE image_hash_lookup SET img = ?, rating_key = ?, width = ?, height = ?, opacity = ?, background = ?, blur = ?, fallback = ? WHERE img_hash = ? and INSERT INTO image_hash_lookup (img, rating_key, width, height, opacity, background, blur, fallback, img_hash) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)

@JonnyWong16
Copy link
Contributor

Thank you for figuring this out. This also explains why manually repairing the database fixes it because going through the steps corrects the unique keys.

Now I know exactly what to fix.

@JonnyWong16 JonnyWong16 changed the title Tautulli hangs after a while Username log filter causes database lock when a database exception is raised Jul 18, 2022
@github-actions
Copy link

This bug has been fixed and will be available in the next release of Tautulli. This issue will be automatically closed once the update is available.

@darthShadow
Copy link

Excellent, thanks.


Perhaps, the temporary caches like the id/image lookups, usernames etc. can all be moved to a separate store (like https://pypi.org/project/diskcache/, specifically: https://grantjenks.com/docs/diskcache/tutorial.html#index) to reduce the chances of these kinds of locks ever happening in the future? Let me know if you want me to create a separate FR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests