WeeWX 5 abnormal memory consumption problem

58 views
Skip to first unread message

Remy Lavabre

unread,
Jul 5, 2025, 6:59:45 AM7/5/25
to weewx-user
Hello,

I'm using the latest version of WeeWX (5) in a venv virtual environment with an 8GB Raspberry Pi 5. It's been working very well for almost two years.

I had to create a driver specific to my Bresser weather station. This driver retrieves the data automatically sent to the Awekas website by my weather station, as well as various other data (Raspberry data, heat pump, electricity consumption, water consumption, etc.).

The problem: Memory consumption increases steadily over time, reaching 8GB after about two months (see attached diagram). It's the WeeWX task that consumes all this memory. After that, WeeWX stops without a message, but the Raspberry Pi continues to run without crashing.
The only solution I've found to avoid this problem is to set up a cron job that closes WeeWX once a week and restarts it automatically. The memory is freed up automatically.

I think the problem comes from the driver since everything else is standard (basic WeeWX installation without any modifications)? However, I followed the examples of the other drivers (simulator and other examples provided) and it has worked perfectly for 2 years... Does anyone have any idea where the problem could come from?

Thank-you...

Diag by month afetr weewx reset :
Raspberry.png

Diag by week after reset WeeWX
Capture d’écran du 2025-07-05 08-40-02.png

Tom Keffer

unread,
Jul 5, 2025, 7:09:52 AM7/5/25
to weewx...@googlegroups.com
Excessive memory consumption is almost always caused by underlying system libraries. They can come and go, depending on operating system updates. Here's an example of one of my stations from the last year:

image.png
The only thing I can suggest is a careful look at your driver for any system calls, then isolate them one-by-one, to see which one is the culprit. 

It can also be caused by repeated allocation of a system resource that is not monitored by Python's garbage collection system. 

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/5a6a6658-e3b5-4f8e-b8c7-970c8bf67280n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages