Library scan not scanning all photos

Don’t enable auto scanning when media is added.
Don’t enable auto tagging photos.
Enable debug mode logging on the server.
Start your photos library from scratch via a plex dance
Reboot the PMS computer. Add 10k at a time, not 1M.