Fix app startup for uwsgi and multiprocess.