Rich,

You're not the only one seeing memory leaks, but so far yours is among the more 
complete reports, helping to narrow it down.  Thanks for this!
I know of several of the extended development team who have been trying to 
reproduce and instrument to zero in on it.  I am sure they will be appreciative 
of your efforts here.

Regards,
\Leon
--
Leon Shaner :: Dearborn, Michigan (iPad)

> On Nov 4, 2019, at 8:53 PM, Rich Bell <[email protected]> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/3753360b-d4c7-44b3-82ca-a8140514b310%40googlegroups.com.
> <amemtest.py>

-- 
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/9C5C610E-29A3-4ADA-B3AD-40545EFD2C51%40isylum.org.

Reply via email to