#Plex DB locking

1 messages · Page 1 of 1 (latest)

carmine pollenBOT
#

📝 If you want to review this again, moonmaster33:
:one: Right-click (or long press with phone) on the message that contains the log
:two: Select: Copy Message Link
:three: Use the command: /logscan <message_link> or !logscan <message_link> and paste the value copied from the previous step where you see <message_link> 📝

#

Welcome @novel surge!

Someone from <@&938443185347244033> will assist when they're available.

Including meta.log from the beginning is a huge help. Type !logs for more information.

After attaching your log, do not forget to hit the green check boxes when prompted by our bot.

#

You can press the "Close Post" button above or type /close at any time to close this post.

carmine pollenBOT
#

I've looked through the discord but cant find a solution. Whenever kometa runs it locks my db and the webui goes down. i then have to reboot the server to get it back. any help would be appreciated. i have attached my config with api keys removed and my logs for both plex and kometa

#
**Rec 01** - 🚀 **PYTHON MODULE UPDATE NEEDED**

🚀 PYTHON MODULE UPDATE NEEDED
In the Kometa discord thread, type !update for instructions on how to update your requirements.
For more information on updating, [https://kometa.wiki/en/latest/kometa/logs/#checking-kometa-version]
3 line(s) with New Python Module Updates. Line number(s): 15-17

wicked quarry
#

Kometa doesn't do anything with the Plex DB. It doesn't even know there is a database behind Plex.

It makes requests of Plex via Plex' API [the same one Plex' own clients use] and Plex manages its own database.

novel surge
#

i get that, but when it uses the API plex then dose things with then DB right? is there a way i can slow kometa down so plex doesn't thrash the db?

wicked quarry
#

You can add a delay between refreshing items, butt aside from that, no, there isn't a general throttle. Typically this sort of thing is indicative of problems in the Plex DB or elsewhere in the path between Kometa and Plex.

#

Whenever kometa runs it locks my db

Seems like you are saying that Kometa is locking the DB, which is not possible since Kometa has no access to the DB.

#

There is some unneeded and non-existent stuff in that config.

These don't exist:

settings:
  # --- THREAD LIMITS (CRITICAL FOR YOUR DB) ---
  asset_threads: 1
  download_threads: 1
  # --------------------------------------------

These are not needed as this is the default value:

    operations:
      assets_for_all: false
      assets_for_all_collections: false
novel surge
#

so the issues isn't kometa even though running kometa is what locks the DB?

wicked quarry
#

This is not a common issue; I've never seen it and I run Kometa all the time.

Kometa is making requests to your Plex server at the same pace as it does to any other Plex server against which it is running.

The DB doesn't get locked on other Plex servers. That implies the problem is in some way connected to your local environment.

Were it happening to me I would pare down the run to do fewer things and see if the issue appears at some particular point.

Match up timestamps in the logs to see what's happening in Kometa at the moment this happens.

#

I don't see anything in that Plex log referring to a DB lock.

#

The only occurences of "lock" are things like this:

Dec 10, 2025 15:32:40.998 [140118689807160] VERBOSE - Adding file for scanner: "/home/northmainave/media/TV Shows/Daredevil - Born Again (2025)/Daredevil Born Again - S00E99- kometa-overlay-lock.mp4?

And then one title that contains "Block"

#

The word "lock" doesn't appear in the kometa log either

novel surge
#

Ok, so the fact that it's happening after running kometa is more of a symptom than the issue. It's something else on my system that kometa might be triggering that's causing the issue? I'm about to leave for work. Would it be ok if I come back later for support on this evening though it's not a kometa issue? Y'all are way more knowledgeable about this subject than I am. If not I understand.

novel surge
wicked quarry
# novel surge That's just a placeholder for Plex.

Sure, just pointing out that neither of these logs contain any mention of the plex DB being locked; I provided the instances of "lock" that are there as a means of demonstrating that I had looked through the log.

#

I checked the Kometa log thinking that maybe its DB was showing up locked, but there's no mention of that.

novel surge
#

Gotcha, when I get home I'll try to get some fresh logs after the UI locks up and see if anything in there reflects my experiences. I might also be calling it the wrong thing that's just from some of the research I did. Thanks for the help. I'll be back in like 9 hours

wicked quarry
#

Also, that Kometa run takes a minute:

Start Time: 16:05:34 2025-12-10     Finished: 16:06:48 2025-12-10     Run Time: 0:01:13

and there's nothing remarkable in the Plex log during that minute:

carmine pollenBOT
#

📝 If you want to review this again, moonmaster33:
:one: Right-click (or long press with phone) on the message that contains the log
:two: Select: Copy Message Link
:three: Use the command: /logscan <message_link> or !logscan <message_link> and paste the value copied from the previous step where you see <message_link> 📝

#

here is that clean log file. i shutdown the server, deleted the file, stated it, then ran kometa. each time i run kometa i lose my web ui. no crash log so its not crashing the server. my mobile app still works fine. restarting the server brings back the web ui.

carmine pollenBOT
#

📝 If you want to review this again, antwanchild:
:one: Right-click (or long press with phone) on the message that contains the log
:two: Select: Copy Message Link
:three: Use the command: /logscan <message_link> or !logscan <message_link> and paste the value copied from the previous step where you see <message_link> 📝

carmine pollenBOT
# carmine pollen
**User Info**

Author of Linked Message: Luma
Person who Invoked the Command: Antwan
File Name: meta.log

Table of Contents:
Page 01: User Info
Page 02: Kometa Info
Page 03: Kometa Summary Info
Page 04: Kometa Config.yml YAML Validation
Page 05: Plex Configuration - Section 1
Page 06: Plex Configuration - Section 2
Page 07: Plex Configuration - Section 3
Page 08: Rec 01 - ❌ [ERROR]
Page 09: Rec 02 - ❌ OVERLAY LOAD ERRORS
Page 10: Rec 03 - ⚠️ [WARNING]
Page 11: Rec 04 - 💬 CONVERT WARNING

little torrent
#

Again, Kometa doesn’t touch the db and this run took 0:50

#

Could be the result of other processes trying to access plex at the same time

wicked quarry
#

That Kometa run is from 2025-12-11 07:09:00 to 2025-12-11 07:09:50

The Plex log is from an hour earlier: Dec 11, 2025 06:07:58 to Dec 11, 2025 06:13:48

So there's nothing to compare in those logs.

However, if a 50-second Kometa run that does almost nothing taxes the Plex server such that the web UI stops responding, that seems like a resource issue outside anything Kometa is doing.

#

Out of curiosity, where did this come from?

--kometa-worker-mode (KOMETA_WORKER_MODE): (redacted)

It doesn't appear in the wiki or the source.

#

BTW, six of your YAML files are broken and can't be loaded:

| File Loaded From: /home32/northmainave/scripts/kometa/TSSK_Anime/kometa/TSSK_TV_SEASON_FINALE_OVERLAYS.yml |
| Config Error: overlays attribute is blank
| YAML Error: overlays attribute is required
| Overlay File Failed To Load

| File Loaded From: /home32/northmainave/scripts/kometa/TSSK_Anime/kometa/TSSK_TV_FINAL_EPISODE_OVERLAYS.yml |
| Config Error: overlays attribute is blank
| YAML Error: overlays attribute is required
| Overlay File Failed To Load

| File Loaded From: /home32/northmainave/scripts/kometa/TSSK_Anime/kometa/TSSK_TV_NEW_SEASON_STARTED_OVERLAYS.yml |
| Config Error: overlays attribute is blank
| YAML Error: overlays attribute is required
| Overlay File Failed To Load


| File Loaded From: /home32/northmainave/scripts/kometa/TSSK/kometa/TSSK_TV_SEASON_FINALE_OVERLAYS.yml |
| Config Error: overlays attribute is blank
| YAML Error: overlays attribute is required
| Overlay File Failed To Load

| File Loaded From: /home32/northmainave/scripts/kometa/TSSK/kometa/TSSK_TV_FINAL_EPISODE_OVERLAYS.yml |
| Config Error: overlays attribute is blank
| YAML Error: overlays attribute is required
| Overlay File Failed To Load

| File Loaded From: /home32/northmainave/scripts/kometa/TSSK/kometa/TSSK_TV_NEW_SEASON_STARTED_OVERLAYS.yml |
| Config Error: overlays attribute is blank
| YAML Error: overlays attribute is required
| Overlay File Failed To Load
#

That Kometa log overall contains very little interaction with Plex, since nothing needs to be updated.

Kometa loads the library contents and makes a few "hey give me a list of all the things in the library" and "hey give me a list of all the things with the overlay label" type requests. There's no thrashing Plex with a lot of requests.

little torrent
novel surge
novel surge
wicked quarry
wicked quarry
novel surge
novel surge
wicked quarry
novel surge
#

I'm pretty sure it's not a resource issue also. I'll check when I run it while monitoring the system to be sure.

wicked quarry
#

I'm seeing a maximum of 36 requests made to Plex during that run.

There is only one set of requests made in a short period, which are 12 movie overlays applied within seven seconds:

[2025-12-11 07:09:33,629] [overlays.py:204]           [INFO]     | (1/41) The Age of Disclosure                                                                       |
[2025-12-11 07:09:34,193] [overlays.py:545]           [INFO]     |   Overlays Applied: Overlay File (0) gradient_top, Overlay File (0) gradient_bottom, Overlay File (0) DigitalPlus, Overlay File (0) 1080P, Overlay File (1) audience_score_high_backdrop, Overlay File (1) audience_score_high, Overlay File (2) maintainerr_13_days |
...
[2025-12-11 07:09:39,835] [overlays.py:204]           [INFO]     | (12/41) East of Wall                                                                               |
[2025-12-11 07:09:40,231] [overlays.py:545]           [INFO]     |   Overlays Applied: Overlay File (0) gradient_top, Overlay File (0) gradient_bottom, Overlay File (0) Ultra-HD, Overlay File (1) audience_score_mid_backdrop, Overlay File (1) audience_score_mid, Overlay File (2) maintainerr_3_days |

Which is hardly a flood of requests.

Aside from that the remaining 24 requests are spread over 43 seconds, which is even less of a flood.

You could do a run with --log-requests enabled, which would show precisely when and how many requests went to Plex to verify my suspicions, but I can't see any way that this run could overwhelm a Plex server.

I realize that this is the symptom you are seeing, but I can't imagine what Kometa could possibly be doing to trigger it.

novel surge
#

I'm starting to wonder if it's just an issue with my Plex. I just tried rebooting my server and cleaning the log so I can get fresh ones and it won't come back up. I don't have time to look at it right now as I'm getting ready for work, but it might be a good idea for me to just do a reinstall of Plex.

little torrent
#

Your plex DB, which I’m not sure you’ve done anything with as far as a db repair

gusty irisBOT
#
Plex DB Repair Tool

DBRepair provides database repair and maintenance for the most common Plex Media Server database problems. It is a simple menu-driven utility with a command line backend.

DBRepair is run from a command line (terminal or ssh/putty session) which has sufficient privilege to read/write the databases (minimum). If sufficient privleges exist (root), and supported by the environment, the options to start and stop PMS are presented as well. (Some envionments require DBRepair to run as the 'root' user.)

You can learn more about this tool and download/use it on ChuckPA's GitHub Repository https://github.com/ChuckPa/PlexDBRepair

wicked quarry
#

Is Kometa perhaps claiming all the RAM on the machine when it runs, and thereby starving the Plex server?

|     Total Memory: 504 GB
|     Available Memory: 344 GB
novel surge
novel surge
wicked quarry
# novel surge I would hope not. That's a lot of ram for something to consume. If kometa is tak...

Those just seem like big numbers and I wondered if some config was allocating a lot to Kometa [or Python] unexpectedly. There is 344gb available there, Kometa isn't consuming 344gb.

I have no idea if this is the issue or not; you are describing a situation that doesn't seem possible [50-second do-nothing run kills Plex Web server] so am just throwing darts based on things I see in the log.

If this were happening to me I might try running Kometa in a limited-resource docker container as a test.

Or on a different machine.

novel surge
#

Im on a seedbox with limited rights. But i think I might be on the right path now. I was looking at the Plex log and it looks like my web app plug-in crashes at boot so that might be the actual issue. Not sure why I can still accept the UI until kometa runs but I'm working with them to get a new docker image pulled down. Hopefully that's the solution.

little torrent
#

This would have been useful information to know upfront

wicked quarry
#

What's a "web app plugin"?

novel surge
wicked quarry
#

I think the idea is that the fact that this appears to be some non-standard plex setup with some mystery thing called a "web app plugin" involved is news.

little torrent
#

Or that it’s an app box with limited rights

novel surge
wicked quarry
#

It's not nomenclature I have ever heard. Perhaps something specific to this seedbox setup?

novel surge
# wicked quarry It's not nomenclature I have ever heard. Perhaps something specific to this see...

I don't think so. I think the WebClient.bundle is a standard Plex thing. That's what seems to be crashing when I run kometa. Well it crashes at boot but still works, idk. I'm pretty sure kometa isn't the issue at this point but the, "straw that breaks the candles back" if you will. It's looking like a Plex issue itself. I appreciate all your help with this. I'll work with the server maintainers to get this resolved. Thanks again!

gusty irisBOT
#

antwanchild used !aenh

@novel surge, anything else needed here? If not, please type /close and hit enter. Please respond within 24 hours of this message or it will be archived.