Handle stale pidfiles, API and frontend apps (#7712)

See https://issues.dp.la/issues/7712