Skip to content

Troubleshooting

Sander edited this page Feb 7, 2026 · 1 revision

Troubleshooting

Quick Checks

# 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.sh

Common Issues

Plex won't start

Check if PostgreSQL is running and accessible:

pg_isready -h localhost -U plex
psql -U plex -d plex -c "SELECT 1;"

Database errors

Make sure the schema exists:

psql -U plex -d plex -c "CREATE SCHEMA IF NOT EXISTS plex;"

Docker port conflict

Change the port in docker-compose.yml if 8080 is in use.

Docker on Linux: symbol errors (ENGINE_init, __isoc23_strtol)

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.

Missing triggers after upgrading

Triggers and functions have been added over time. If you migrated on an older version, you may be missing some. Run:

./scripts/doctor.sh

This checks for all required triggers, functions, and tables, and creates any that are missing. It also detects and repairs bad data (with confirmation).

Known Fixed Issues

Timeline 500 Error (fixed in v0.9.2)

/:/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 HTTP 500 (fixed in v0.8.12)

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.

Kernel Panic (fixed in v0.9.10)

fflush(NULL) call caused deadlock with log mutex. 14+ processes blocked on _fwalk -> sflush_locked -> flockfile, triggering WindowServer watchdog timeout.

Logging Storm (fixed in v0.9.12)

Debug log statements firing on every query at ERROR log level, causing 34+ GB/day disk writes and system freeze.

Clone this wiki locally