Running five applications and their database on a single host with only 465MiB RAM, well, works... but not so much.
The database crashes every few days, unsurprisingly, which causes the Friendica daemons to stop too. Rather than making these automatically restart too, I think I better do what I did for the Pleroma/Peertube host as well: move the database to a separate host.
It is better to share different applications on a host than to have an app and its db on the same host. My argument is that different applications are not busy at the same time, while an application and its database usually spike at the same moment (when you post something or a post comes in). It's also better to use two hosts rather than one with double the specs, because on AWS at least double the specs doubles the price, the RAM and the burst credits but not the CPUs while two hosts naturally have double the price, RAM, burst credits and CPUs.
I've first setup the second host with a db as replica. I've found this the easiest way to transfer a database: first setup a replica in the new location, then let them switch sides. The replication has been running fine for a while. The replication threads even survived yet another crash of the source db. With mariadb/mysql you don't have such a thing as a primary or replica role as you have with postgresql, so you don't have to switch roles for all apps at once. I guess I'll do the less important ones first...
Gidi reshared this.
Gidi Kroon
in reply to Gidi Kroon • •That went fine and is running smoothly. All memory that became available by removing the db got claimed by the app processes almost immediately. Almost like one of those concrete walls soaking up fresh paint.
Now wondering why loading/proxying remote images locks up everything.
Gidi Kroon
in reply to Gidi Kroon • •top
reporting 2MiB RAM left and 0.3MiB free swap size. But magically that problem went away.