I have a Pi 3B+ running Ubuntu Mate 18.04 (originally upgraded from 16.04 and now the official image - same issue) which is run headless as a Bit Torrent client. Briefly it is configured thus:
On-board NIC manually set to an IP address on my LAN, firewalled to prevent Internet traffic - only ssh and vnc traffic allowed
A USB dongle NIC configured for DHCP and connected to my router for Internet access (firewalled in drop zone)
systemctl set-default is multi-user.target (no gui)
A 240 GB SSD is attached via a USB connection
vnc4server is installed
In operation I:
Boot the Pi
Connect by ssh and load the vncserver "vncserver :1 -geometry 1600x900 -depth 16"
(I have a script loaded by System; Preferences; Personal; Startup Applications; which checks every second for the presence of a vpn tunnel and does a killall transmission-gtk if the tunnel is not found)
Close the ssh connection
Connect to the vnc session with Vinagre (on a CentOS 7 machine)
Open a terminal and run a script to connect to my VPN provider's system
Invoke Transmission to perform such Bit Torrent business as I might wish
Close the vinagre session until I wish to check on progress
The system/process works fine EXCEPT that on occasion I find that essentially all memory and swap has been consumed. I have been monitoring the Pi with glances over an ssh connection. I find that Firefox will consume a lot of memory (expected) but will release it when closed. When the out of memory situation occurs - a constantly glowing greed "disk" access light on the Pi is a clue - I find that two instances of mate-panel are together consuming in excess of 80% of RAM and swap.
If I issue a killall mate-panel I find that the memory is immediately released. If I connect with vinagre with the system running normally (I generally cannot connect and/or the system is unresponsive with the memory condition) and killall mate-panel I observer that the upper and lower panels disappear and immediately reappear. Today I setup a script to do a killall mate-terminal every 10 minutes as a big hammer workaround.
I suspect that this is in some way related to vncserver. I ran the same process with the Pi connected to a monitor with the gui interface loaded and did not experience any memory issue in a couple of days running the vpn and Transmission.
Just wondering if anyone else has had similar experiences or if anyone has some insight to what is going on and perhaps how to fix it.