Are you using a web server (like NGINX?) in front of the Mendix app? If not, be sure to add it.
If you do have a web server, ensure that it's serving up the static content (like mxui.js) and that compression is enabled.
If that doesn't solve it, I think you can increase the NGINX timeout like they suggest here.
Let us know how it goes!