Use session_write_close to avoid blocking Ajax request on manual sync