I have raspberry PI 4B 4GB RAM with openwrt 22.03.2 firmware. I have intermittently lost of wan problem. I suspect the problem is from abnormal high memory usage. The memory usage is 144MiB/3.71GiB 4% after rebooting, and then it climbs up and eats all memory, see snapshot below:
144 MB RAM usage would be a bit higher than expected, but not necessarily a problem - the continuously rising RAM usage however certainly is.
Given that there is quite a big potential of 'misconfiguration' (rogue logging, server processes filling up /tmp/ or similar issues), I would start debugging by having a look at the file sizes under /tmp/ and RAM usage of the process via (e.g.) htop, if you don't find a likely culprit rather quickly, starting over with a fresh configuration/ fresh flash and a minimal setup (just WAN/ LAN and the necessary VLAN setups, if applicable) and have a look what happens there for ~a week, before slowly enabling additional features one-by-one.
While the RPi ecosystem might not be the most pleasant one for developers, it has a strong following by OpenWrt users, so I'd be surprised if this was a generic issue for these devices.
Install htop and now I am confused with the memory usage result.
htop shows 53.4MB/3.71GB when openwrt is showing 320MiB/3.71GiB in the luci overview page(I rebooted the router an hour ago so the memory usage is 320M at this moment).
The two values don't match each other.
Now I found what is causing the high used memory. I have USB harddrive attached to Pi and shared by samba. I stored a VHD in the USB drive. Everytime I start this VM(the VM uses VHD in shared USB drive) from my laptop, the memory usage increases to the almost the maximum. However, the memory usage stays even after I shut down the vm.
I tried to restart Samba service, it won't reduce the memory usage. How to release the used memory after VM is shut down? or enabling swap space will help?
Hello I have a similar issue, high Ram used (97%) with samba and also experience
some network disconnections.
I first started to notice network disconnections randomly a while back it could happen when not even doing anything online it would go up and down like a yoyo and then a minute or so it would be ok, is this your experience?
I did a further test when this occurred yesterday, checked another 2nd PC hard wire Ethernet connected to the same openwrt router and it remained solid so I think it still could be my network Ethernet port on the PC that is gone bad, I will install a separate card and see how it goes since its so random its hard to tell but in my case it could be a failing network card.
It might be worth you trying the same test as I did above to rule out a possible bad network card also use a network cable tester (mine were fine)
There is also a post here which allows you to flush it, not sure how to do it as a scheduled command that may help you.
Again not 100% on all this above but it is a frustrating issue. I am also on latest openwrt x86 build.
Can you read my post above I left a linked post and what occurs with my clients (network connection going up and down like a yoyo) and let me know if this is similar to what occurs your end?
I am on the latest openwrt build also and experience it. I also left a link on my above post showing how to flush the ram. I think its worth checking the network port or replacing it and double checking the network cable just in case.
Also can you please let me know if you are by chance using the intel i225 or i226 network chipset in your openwrt router or devices at home? since these are known for connection drops it maybe related not sure.