On Sun, Mar 12, 2023 at 10:38 AM Andre Robatino <robatino@fedoraproject.org> wrote:
I have 3 machines with clean F37 installs. One of the F37 machines has 4GB of RAM, and I maintain it as a backup and normally only log in via ssh and do dnf updates via command line. In the last few weeks this has become extremely difficult to do due to being automatically logged out, presumably by systemd-oomd.

You should look for reasons with journalctl and monitor memory usage in a terminal (using top, bpytop).
 
It happens even if I boot in multiuser, which ought to reduce memory use.

Again. you should be monitoring memory use instead of guessing.   It would not be surprising that some recent
"improvement" increased memory use.  

From what little I've read and what experimentation I've done so far, it appears that being logged into a DE (maybe only GNOME or KDE?) protects against this, but non-DE logins (including ssh), and any commands running in them, are not protected. This goes against the expectation that non-DE access should be LESS likely to run out of memory, especially if there isn't even a DE running. How hard would it be for systemd-oomd to be configured to protect non-DE logins and anything running in them?

I've also read that configuring non-zram swap might be a cure. As I said, these are clean F37 installs, and if that's necessary for reasonable behavior when there's not enough RAM, the installer should be doing it automatically. In my case, I don't think that's the cause, since the free command suggests that I'm only using a fraction of both the memory and swap even when the automatic logging out is happening.

Since you are using ssh, you should consider whether a network connection is getting dropped.  My
network monitoring software reports when a network interface goes offline.  Recently  there have been
drops of inactive wifi connections with Fedora 37.

I suspect these might be a result of efforts to reduce power consumption.

--
George N. White III