I'm running Server version Version 1.0.3.2461 on Raspberry Pi 3. My library became corrupt so I removed the Library and recreated it. My TV DB has 1500 episodes. Plex scans the library and creates entries for the episodes ok. It then starts downloading the meta data and eventually the system hangs due to swapping.
Using top I discovered that that "Plex Script Hos" just keeps growing until all memory is consumed then the system swaps ok for a while. Eventually the level of swapping creates very high wait times and the machine effectively hangs. If I kill this "Plex Script Hos" the system returns to normal.
I found that if I force a refresh on just one show, and let that run until the system slows, that kill the process and refresh again I can .eventually get all the meta data downloaded, then Plex loads it ad the processes completes correctly.
It appears that the high memory usage appears to be related to the downloading metadata, not the scanning or loading. I've found this issues is worse for shows with more episodes. The full command line for the processes that is consuming all the memory is
Plex Plug-in [com.plexapp.agents.thetvdb] /usr/lib/plexmediaserver/Resources/Plug-ins-35f0caa/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.0.3.2461-35f0caa /usr/lib/plexmediaserver/Resources/Plug-ins-35f0caa/TheTVDB.bundle
Is there a way to throttle the TheTVDB meta data process to limit how much memory it consumes.