Analytics on Ghost
I wanted some basic web analytics for my blog. However, the idea of installing Google Analytics didn’t appeal to me because GA requires cookies and I am not about to display a cookie banner on my site! Fortunately, it looks like Ghost supports integration with Tinybird.
Tinybird looks pretty cool, but the Ghost integration is supported using only the Dockerized version of Ghost and I installed my blog using the ghost-cli
:[I did see that Ghost created a way to migrate from ghost-cli
installs to Dockerized installs. The migration tool worked great! I ran that and then also the Dockerized integration for Tinybird.
Concerningly, after the migration I noticed that my Linode instance was consuming a huge amount of CPU and RAM. Trying to log-in to the Ghost admin panel was timing out! I noticed what I thought were two runaway node
processes and a mysqld
process that I didn’t need anymore. When I tried to kill them, they would restart. When I totally removed the mysql-server
and nodejs
packages and disabled mysqld
in the systemctl
system manager, they would still restart. I dug around for quite a while and finally came across the ps auxf
command. This command let me see that the mysterious processes were being spawned by the Docker runtime itself. Ugh. Makes sense that the runtime would incur its own performance overhead but its pretty annoying to have to deal with that.
I restarted my Linode instance and the memory usage seems to be better now? Wondering if maybe the migration and integration with Tinybird leaked memory and left my system in an unstable state. I probably could have also just restarted the Docker containers and saved myself the extra downtime.
I am hoping to be able to keep running my site on a 1GB Linode instance to save cost. Bumping it up to a 2GB Linode instance would bring the costs close to the level of a paid Ghost Pro account which I am hoping to be able to avoid. Perhaps I can configure Docker to use less than the full 1GB of memory to prevent my system from slowing to a crawl?
Some Ghost Annoyances:
- Trying to create a code block with three backticks totally blew away my draft! I probably need to create drafts entirely inside a Markdown block in order to safely support code blocks.
- Can't find a way to see a revision history for my posts. This makes me feel uneasy about drafting posts inside Ghost itself.
- When I paste from Google Drive, spacing and other formatting are not preserved.