If memory increases every couple of seconds, which suggests that the leak is in the part of device driver that deals with LOOP packets. But, you're on an WMR300, right? As I recall, their LOOP packets are more like 10-20 seconds apart --- too long to correlate with what you're seeing. Or, are you on something like a Vantage with a shorter LOOP packet interval?
I've noticed memory leaks in other instances, such as my own site http://www.threefools.org/weewx. In my case, I spent a couple of weeks trying to chase it down, and concluded the problem was somewhere in the sqlite database driver, but couldn't put my finger on it conclusively. Then, magically, Debian did an update and the problem (nearly) went away. Memory leak dropped from 5 MB/day, to almost nothing (maybe a megabyte or two over a week). Again, it suggests the problem was (is) in a device driver somewhere. -tk On Sun, Aug 11, 2019 at 8:55 AM Leon Shaner <[email protected]> wrote: > TK, you may want to know... > There definitely is a memory leak in weewxd. > It grows by 1 KiB about every 2 seconds. > > I haven't yet correlated whether weewxd can grow to a point where other > things start dying, and whether that has any impact on the USB stack. > > What tipped me off was I just got a warning from sar/sa1 stating it > couldn't do it's job due to "resource unavailable," so I went and had a > peek. > > This RPI is a Zero W(H), so it has only 1 GB of RAM. > It's full enough on memory that it's using some swap. > > Here is just one snapshot. That RES (RZ) value for weewxd goes up by one > digit every 2 seconds. > I gleaned that is 1 KiB, but I am not 100% certain. It might only be 1 > byte every 2 seconds -- whatever the actual unit it goes up by one every 2 > seconds. I've never seen it come down. > > I may enhance my watchdog to check the weewxd memory size and restart it > after a limit, then see if that has any positive impact on avoiding the USB > stack going south. Yeah, I guess I'll work on that this week. I'll put > some logging in so anyone who wants to keep an eye on it can know whether > their setup is memory leaking also. =D > > I have the WMR300 driver, in case the leak could be specific to that > driver. :-/ > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/D7820F76-CC3A-4CC2-B359-4AF967A32638%40isylum.org > . > > > Regards, > \Leon > -- > Leon Shaner :: Dearborn, Michigan (iPad) > > > On Aug 10, 2019, at 9:01 AM, Leon Shaner <[email protected]> wrote: > > > > It isn't the weewx version, it's the pi kernel / usb module version. > The usb stack hangs. I wrote a watchdog to detect it and reboot the pi, > because so far there has been no fix to the issue. I am not able to > correlate this to a memory leak. What are you seeing re: memory? > > > > Regards, > > \Leon > > -- > > Leon Shaner :: Dearborn, Michigan (iPhone) > > > >> On Aug 10, 2019, at 4:29 AM, Gordie Stirling <[email protected]> wrote: > >> > >> Hi all, > >> > >> I have been runnin Weewx on a Raspberry Pi (model a) for a couple of > years with a Maplin NG96Y, without any issues. > >> > >> I recently upgraded to a Pi3, running Stetch, and Lighttpd. the old Pi > was starting to struggle and sat at 100% cpu for most of the time. > >> > >> All worked well for a month or so, the the station locked up. After a > reset(batteries out, usb disconnected) it works for an hour or so, then > locks the connection again. the base station still continues to function. > >> > >> Error in syslog is Aug 10 09:17:28 raspberrypi weewx[10377]: fousb: > get_records failed: [Errno 110] Operation timed out. > >> > >> so far, other than rebooting, i have used Easy Weather to clear tge > memory, but alas had no effect, 85 mins later, timeouts start again. > >> > >> I am thunking of downgrading the Pi to Jessie, and using reverting to > Weewx 3.9.1, but wondered if anyone has had this problem and managed to fix > rather than rebuild. > >> > >> TIA > >> > >> G > >> > >> -- > >> 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]. > >> To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/afbf7556-425f-4eca-8088-caaf96c06805%40googlegroups.com > . > > > > -- > > 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]. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/315802A3-3CD7-4206-B22B-77A377B0F5A7%40isylum.org > . > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/D7820F76-CC3A-4CC2-B359-4AF967A32638%40isylum.org > . > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zECp12D-2O0S10NOGFOZQFUSMrjPSdYgDwH3nf3tQL5sHw%40mail.gmail.com.
