-
Notifications
You must be signed in to change notification settings - Fork 5
Troubleshooting
# Check PostgreSQL connection
pg_isready -h localhost -U plex
# Check logs (macOS)
tail -50 /tmp/plex_redirect_pg.log
# Check logs (Docker)
docker-compose logs -f plex
# Check and fix schema + data issues
./scripts/doctor.shCheck if PostgreSQL is running and accessible:
pg_isready -h localhost -U plex
psql -U plex -d plex -c "SELECT 1;"Make sure the schema exists:
psql -U plex -d plex -c "CREATE SCHEMA IF NOT EXISTS plex;"Change the port in docker-compose.yml if 8080 is in use.
Plex bundles its own musl libc. If you try to use Debian's libpq5 (apt-get install libpq5), it links against glibc + OpenSSL which is incompatible with Plex's musl runtime. Use the included Dockerfile which builds libpq from source on Alpine (musl) without OpenSSL. See #5.
Triggers and functions have been added over time. If you migrated on an older version, you may be missing some. Run:
./scripts/doctor.shThis checks for all required triggers, functions, and tables, and creates any that are missing. It also detects and repairs bad data (with confirmation).
/:/timeline endpoint returned HTTP 500 during playback with std::exception.
Root cause: sqlite3_last_insert_rowid() called with wrong database handle.
Fix: fallback connection lookup + sequence advancement before skipping empty INSERTs.
TV shows endpoint returned HTTP 500 with std::bad_cast exceptions.
Root cause: Plex's SOCI library bug with BIGINT aggregate functions.
Fix: aggregates declared as TEXT type to bypass SOCI's strict type checking.
fflush(NULL) call caused deadlock with log mutex. 14+ processes blocked on _fwalk -> sflush_locked -> flockfile, triggering WindowServer watchdog timeout.
Debug log statements firing on every query at ERROR log level, causing 34+ GB/day disk writes and system freeze.