140 days ago · Tech · hide · Fediverse post

My IONOS VPS has been suddenly going unresponsive lately. I told Gemini I have this VPS for editing files in Neovim, and it suggested I might be running out of memory, especially if I’m running a TypeScript LSP, which is known for hogging lots of resources. It seems to have happened at least a couple times when I’m editing a .ts file, so that’s a good theory. Add a swap file The first thing I did was add a swap file so memory can spill over onto disk if necessary. Gemini said to do this with fallocate or dd depending on your filesystem, but after looking into it, I decided to just use dd to be safe. See this Ask Ubuntu thread. Here’s what I did: # create the swap file sudo dd if=/dev/zero of=/var/cache/swapfile bs=1K count=4M # only root should be allowed to read/write the file, since it can hold sensitive data sudo chmod 600 /var/cache/swapfile # format the file as swap sudo mkswap /var/cache/swapfile # activate the swap file sudo swapon /var/cache/swapfile # check the swap status…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town