Hi,

Sure looks like a memory leak to me. In my experience once weeWX has been 
running for at least an hour your memory usage should have settled down to 
a fairly steady state. How much it uses depends on what extras(extension, 
own code, skins etc) you have added to weeWX. You will find that with a 
leak weeWX will continue to run until some magic level of memory usage is 
reached and then 'things' will not work. In my case I had a fairly 
aggressive leak that chewed up about 1.5G over 7 days and then weeWX would 
continue to run but reports stopped being genereated, you could almost set 
your watch by the time it took from restart to when weeWX experienced 
issues. Until I got around to tracking down th eleak I was restarting weeWX 
every few days to avoid the lights going out.

How to fix it? First thing is to identify the leaker. I guess there are a 
number of approaches; I have seen Matthew mention some python tools, OK I 
guess if you know what you are doing with python. The low tech approach is 
to disable everything except the standard weeWX functionality, cmon (I have 
found cmon to be stable) and any extras that 'add data to your database' 
(don't want to lose data) and see if the leak disappears. If still leaking 
then cut back to standard weeWX and cmon only, that should rule out any 
python libraries and most likely point the finger at those extras that are 
adding data to your database (if you have any). If no leak, then start 
adding your 'extras' back in one at a time restarting weeWX each time. Can 
be a slow process as you might need to wait for an hour or two to see if 
you are leaking or not after a change. Depending on what 'extras' you have 
you might be able to target some of them, the bigger more complex ones 
might be candidates. In the past I have had some issues with the forecast 
extension, it (or more correctly the way I was using its product in 
reports) was the cause of my big leak, I removed the extension and the leak 
disappeared. I added it back in but reworked the way I included its product 
in my reports and I have not had a problem since. So sometimes the fix can 
be subtle.

Not the definitive guide to memory leaks, and I am sure a few others will 
have different advice, but this is the approach I have taken in the past.

Gary

On Thursday, 27 July 2017 18:04:14 UTC+10, Neil Trimboy wrote:
>
> I'd be grateful if someone could post some cmon service graphs of mem_used 
> of weewx running on a Pi.
> Id like to know/see typical use.
> Attached is mine...I am in the process of setting up my weewx install. so 
> the large spikes are updates/installs and several reboots, but it looks 
> like I have a memory leak somewhere, which would not be a surprise and I 
> have some bits of my own code running....
>
> Thanks
>
>
> <https://lh3.googleusercontent.com/-qmfT-WPLQ9M/WXmeRfPrIgI/AAAAAAAACgU/QOhIUTAyY2IhGCMRkbE_MUAhAG1FLHSmgCLcBGAs/s1600/monthmem.png>
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to