Run mod_mam_muc on the same server's host as all other modules. Wrote mod_mam_muc_async_writer:wait_flushing/4.