TK, Thanks for confirming I am not totally crazy. In my case it is aggressive enough to bring the pi down in about a week. When I get a chance I’ll fire up my ubuntu machine and see what I see. I’m curious enough to keep looking, but doubt I will find anything more. And again, thanks for all your work on WeeWX -rich
On Tuesday, 5 November 2019 08:10:23 UTC-5, Thomas Keffer wrote: > > I have experienced memory leak issues as well, but only under 32-bit > Debian systems. > > About 6 months ago, I tried to isolate the problem, and, like you, came to > the conclusion that it was in the sqlite3 "wrappers." In fact, I came up > with a memory test program that looks very similar to your amemtest.py, > except that it uses the weedb API. > > Then, mysteriously, the problem went away with a Debian upgrade. Well, > almost went away. WeeWX still leaks memory, but only a couple megabytes a > week --- something I can live with. The plot below is memory usage over the > last month. Complete series here <http://www.threefools.org/weewx/> > (lower-right > plot). > > [image: image.png] > > -tk > > > > On Mon, Nov 4, 2019 at 5:53 PM Rich Bell <bell...@gmail.com <javascript:>> > wrote: > >> I'm running on: raspbian stretch, python 2.7.13, and WeeWX 3.9.1. >> >> I was noticing a steady increase in memory usage. I narrowed it down to >> one service I had installed. This service binds to the loop event and makes >> over 10 calls to getSql. I updated the service to open and close the >> connection on each loop event. This seems to have stopped the memory >> increase. >> >> Next, I wrote a small program that does the same steps. Create a >> connection, get a cursor, execute a select, fetchone, close the cursor. But >> this isn't exibiting the memory increase. >> >> Next I wrote a wrapper class for the Connection class and subclassed the >> Cursor class, like WeeWX does. Running with these, I am again seeing the >> memory increase. >> >> I don't see how the 'wrapper' classes should matter... Granted at 10+ >> calls per loop, this is aproximately 240 calls a minute - so it would add >> up fast; but I would think others would be seeing something too. I did see >> this thread about the forecast service, >> https://groups.google.com/forum/#!topic/weewx-user/H4GVpoI5l70/discussion >> It looks to make a lot of calls to getSql, but binds to archive, so it >> would happen a lot slower. Not sure if there was any resolution. >> >> I've attached my test program. It can call the sqlite classes directly or >> use the 'wrapper' classes I stole from WeeWx. I may be all wet, but I'm >> seeing something strange in my environment... I'll keep digging. >> >> -rich >> >> >> >> >> >> >> -- >> 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...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/3753360b-d4c7-44b3-82ca-a8140514b310%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-user/3753360b-d4c7-44b3-82ca-a8140514b310%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/e4fbf16f-b48c-43dc-a3fd-07c0b335869b%40googlegroups.com.