Yesterday, I finally got around to moving my Discourse forum to a new hoster. The last two years I had it running at Communiteq – rock-solid, but the (reasonable!) $50/month is more than I am willing to keep spending on a very low-traffic forum.
So I looked into a couple of hosting companies and, in the end, decided to go with PikaPods. It’s a European outfit (Malta); I like what they have on offer, and my stuff resides in the EU. They provide managed hosting not just for Discourse but for all kinds of apps. The idea there is that you pick an app you’re interested in (e.g., Discourse, FreeScout, Bugsink, plus many others), and they set it up for you. Fully automated, they recommend a vCPU/RAM/storage config, and after about five minutes, you have a fresh instance. If you decide it needs more juice, you adjust vCPU/RAM/storage, the pod reboots, and you’re good. Really good pricing, too.
I like that concept a lot.
The move itself was surprisingly painless – which was delightful not last because I really wasn’t looking forward to it. (Hadn’t done it before; was expecting hassles.) The PikaPods account creation was straightforward, the pod setup was super simple, and my one support request got a helpful reply within the hour. Very nice.
So my first-day experience: excellent.
Disabling (parts of) Discourse’s message bus
Today, I ran into an issue with Discourse’s message bus which made repeated requests to /message-bus/*/poll
. They would regularly take up to 25s (!), and when that happened I could see the page loading stall. Not cool.
Why is that happening? If I understand it correctly, this forum feature uses long-polling and sort of saturates the HTTP connection pool of my little instance in the process. As a remedy, the good people on the official Discourse message board suggested throwing more CPU at the problem, but I’d rather not – I’d really like to keep things small around here.
So, to decide on a course of action, I read up on what the poll
endpoint does. What would happen if I disabled those calls? Apparently this:
- Users won’t see new posts without manually refreshing
- Notifications won’t update in real-time
- The forum feels “static” rather than live and interactive
- Multi-user editing and collaboration features break
Aha! So nothing I need, got it.
A bit later, after more research and tinkering, I arrived at a working solution: a tiny JS in the site’s head that brute-forces stopping the message bus:
const pollStopperInterval = setInterval(() => {
try {
Discourse.__container__.lookup('service:message-bus').stop();
console.log('Discourse message bus stopped');
clearInterval(pollStopperInterval);
}
catch (error) {
console.warn('Error stopping message bus:', error);
}
}, 200);
Very good, and now my Discourse instance runs fine with 3 vCPUs and 8 GB of RAM. And I have yet to encounter any issues.