The logs do indicate a database issue and restarting that might have fixed it as well. I guess you restarted mysql as you mentioned, while both apps use postgresql.
Actually the line of:
FATAL: remaining connection slots are reserved for non-replication superuser connections
gives a good indication here. I have seen that recently, that if apps hog onto the postgres connections, it eventually may exhaust the connection pool, then this message is shown. A postgresql service restart resolves this, as it frees up those connection slots.