<summary>Any tips on increasing PMM performance?</summary>
Use PMM Caching where possible, this allows PMM to temporarily store commonly-used information so that it can be retreived more efficiently. There are multipe things that can be cached within PMM, see the link: https://metamanager.wiki/en/latest/search.html?q=cache&check_keywords=yes&area=default
Run PMM after PLEX Scheduled Tasks, as Plex's API tends to be slower at responding whilst it is performing the tasks. By default, PMM runs at 5AM to avoid the 3-5am window that Plex suggests for Scheduled Tasks.
For users who are more technically advanced and happy to risk manipulating the Plex database, considering altering the PRAGMA_CACHE settings within Plex: https://www.reddit.com/r/PleX/comments/ic3cjr/anyone_try_giving_sqlite3_more_cache_to_help/
- NOTE: you MUST use the version of sqlite3 tool that comes with your running version of PLEX or you will mess up your PLEX DB beyond repair. See this article on how to find the proper version for your setup: https://support.plex.tv/articles/repair-a-corrupted-database/
</details>
<detailsclass="details-tabs">
<summary>Why does my PMM run take so long to complete?</summary>
Every time an item (media, collection, overlay) needs to be updated, PMM needs to send the request to Plex, and then receive confirmation back from Plex that the action has been completed. This can take anywhere from seconds to minutes depending on when Plex provides a response. Given that the typical run can update hundreds or even thousands of items, this can quickly add up to a lot of time. If "Mass Update" operations are used, then every single item in the library needs to go through this process, which can be lengthy.
Overlays can be particularly cumbersome as PMM needs to perform the following actions for each of the items that need to have an overlay applied:
- Check which overlays are applicable (this will take more time depending on how many overlays you are applying)
- Compare the current poster to confirm what overlays are already applied, if changes are needed then continue with the following steps
- Grab source image from Plex and save it to disk
- Draw each overlay image on top of the source image
- save final image to disk
- Tell Plex to apply new image to the item
- Wait for Plex to responsd confirming that the change has been made
The above two points can be greatly exasterbated if PMM has to update every episode within a Show library rather than just the Shows themselves, as there can often be hundreds of thousands of episodes to be updated with mass operations or overlays.
Additionally, some collections requires a lot of computing resource to determine the critera of the collections that are to be made. This is commonly seen in the Defaults files for Actor/Director/Producer/Writer which need to get the crew information for each of the movies/shows within your library, and then calculate which ones appear the most to find out which are the most popular. The larger your library, the longer this process will take.
</details>
<detailsclass="details-tabs">
<summary>Can I schedule library operations and/or overlays to happen at a different time than collections?</summary>
Yes, the recommended approach is to set up a new library for the Operations/Overlays, mapping it back to the original library, and then scheduling the library, as outlined below
```yaml
libraries:
Movie Operations: # NAME DOESN'T MATTER BUT MUST BE UNIQUE
library_name: Movies # THIS MUST MATCH A LIBRARY IN PLEX
schedule: weekly(monday)
operations:
split_duplicates: true
overlay_path:
- pmm: resolution
```
</details>
#### Errors & Issues
<detailsclass="details-tabs">
<summary>Why doesn't PMM let me enter my authentication information for Trakt/MAL?</summary>
PMM needs to run in an interactive mode which allows the user to enter information (such as the Trakt/MAL PIN) as part of the authentication process. This can prove troublesome in some environments, particularly NAS.
Chazlarson has developed an online tool which will allow you to perform the authentication of both Trakt and MAL outside of PMM, and will then provide you the completed code block to paste into your config.yml.
The scripts can be found here. Click the green play button, wait a little bit, then follow the prompts.
https://replit.com/@chazlarson/MALAuth
https://replit.com/@chazlarson/TraktAuth
</details>
<detailsclass="details-tabs">
<summary>Why am I seeing "(500) Internal Server Error" in my log files?</summary>
A 500 Internal Server Error happens when the server has an unexpected error when responding to an API request.
There could be any number of reasons why this happens and it depends on what server PMM is talking to although its most likely coming from your Plex Server.
Most of the time these errors need to be resolved by changing something specific to your set up but some do come up that can be fixed (i.e. Plex throws one if you upload a photo larger then 10 MB)
Many Appbox Setups will throw this error when too many requests are sent, or if the central metadata repository is not properly configured to allow users to upload custom posters.
Take a look at the following logs:
:one: Settings | Manage | Console -> then filter on Error and Warning to see what might be going on
:two: Check the plex logs (container or other) for the "Busy DB Sleeping for 200ms)
There is nothing that PMM or our support staff can really do to resolve a 500 error.
</details>
## Knowledgebase
## Knowledgebase
This section aims to provide some guidance on the most common issues that we see.
This section aims to provide some guidance on the most common issues that we see.