I recently had a weird problem with my plex media server in that it would crash upon trying to scan my library. After a great deal of debugging, I finally found what the problem was (a file that was named in such a way that it caused the scanner to crash). In order to debug this problem, though, I came across some great under-the-hood tools within plex (which is all python, very cool). After reading this link, I moved all of my Movies out of the main folder. At that point I moved the files back in, one letter at a time. My Plex server is a CentOS 6.5 VM that mounts a ZFS NAS.
I moved the files one starting letter at at time
mv -v /path/to/src/A* /path/to/dest/
Once that had finished moving I ran the scanner manually using the following command:
sudo su - plex -c "export LD_LIBRARY_PATH=/usr/lib/plexmediaserver; \\ /usr/lib/plexmediaserver/Plex\ Media\ Scanner -h"
Thankfully, the plex platform is really well documented and has a great community around it, so searching for the errors I was seeing led me down the right path to solving the issue. I’m still not sure what caused the file names to become corrupt or unhappy, but I suspect that it had to do with the disk failure I had in my ZFS raid.