I don't have anything to add to this conversation, except that it's curious that after 10+ years of never seeing a Python MemoryError, this is the second in two days.
Perhaps an update to an underlying library is leaking memory like crazy? -tk On Thu, Dec 31, 2020 at 10:55 AM vince <[email protected]> wrote: > Cheetah is notoriously hard to debug, and Belchertown is a very > complicated skin under the hood. Are you sure you didn't edit the > Belchertown skin ? > > If not, I'm going to guess here that the driver emitted something that the > Belchertown skin didn't expect, or that it did 'not' emit something > Belchertown expected. A weewx restart should have cleared that out unless > you had a sensor failure or craziness on your WeatherFlow gear, which > (unfortunately) happens a lot. > > First thing to try if it persists is to disable Belchertown and see if > that helps. If so, that helps pinpoint where to dig next. > > To check your WF gear you could always run my standalone python UDP > listener (link) <https://github.com/vinceskahan/weatherflow-udp-listener> to > try to debug what the WF gear is sending. If you run my listener you need > to make sure the weewx WF driver is set with shared_sockets=true 'or' stop > weewx while running my listener. My listener has some python > prerequisites to add to your system, so read the README carefully and do > what it says. > > > On Thursday, December 31, 2020 at 8:16:49 AM UTC-8 [email protected] > wrote: > >> I just restarted weewx and memory usage dropped to about 15%! >> >> I failed to note it in original post but CPU utilization was probably at >> about 50% consistently before weewx restart and dropped to <30% after >> restart. >> >> Regards, >> >> Garry >> >> On Thursday, December 31, 2020 at 8:10:09 AM UTC-8 [email protected] >> wrote: >> >>> >>> >>> Weewx was started at about 10:30 PM on 2020-12-30. Started logging >>> MemoryError at 06:53:39 AM 2020-12-31. Here's one instance: >>> >>> 2020-12-31T07:30:19-08:00 LockyerHomeServer /weewxd: weatherflowudp: >>> MainThread: Listening for UDP broadcasts to IP address <broadcast> on port >>> 50222, with timeout 90 and share_socket False... >>> 2020-12-31T07:31:19-08:00 LockyerHomeServer /weewxd: weatherflowudp: >>> MainThread: Listening for UDP broadcasts to IP address <broadcast> on port >>> 50222, with timeout 90 and share_socket False... >>> 2020-12-31T07:32:29-08:00 LockyerHomeServer /weewxd: weatherflowudp: >>> MainThread: Listening for UDP broadcasts to IP address <broadcast> on port >>> 50222, with timeout 90 and share_socket False... >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: Generate failed with exception '<class >>> 'MemoryError'>' >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** Ignoring template >>> /home/weewx/skins/Belchertown/index.html.tmpl >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** Reason: >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** Traceback (most recent call last): >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** File >>> "/home/weewx/bin/weewx/cheetahgenerator.py", line 323, in generate >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** unicode_string = >>> compiled_template.respond() >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** File >>> "_home_weewx_skins_Belchertown_index_html_tmpl.py", line 1273, in respond >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** File >>> "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1685, in >>> _handleCheetahInclude >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** file=file) >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** File >>> "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 775, in compile >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** compiler.compile() >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** File >>> "/usr/lib/python3/dist-packages/Cheetah/Compiler.py", line 1800, in compile >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** >>> self._swallowClassCompiler(self._popActiveClassCompiler()) >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** File >>> "/usr/lib/python3/dist-packages/Cheetah/Compiler.py", line 1825, in >>> _swallowClassCompiler >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** classCompiler.cleanupState() >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** File >>> "/usr/lib/python3/dist-packages/Cheetah/Compiler.py", line 1305, in >>> cleanupState >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** self._swallowMethodCompiler(methCompiler) >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** File >>> "/usr/lib/python3/dist-packages/Cheetah/Compiler.py", line 1404, in >>> _swallowMethodCompiler >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** methodCompiler.cleanupState() >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** File >>> "/usr/lib/python3/dist-packages/Cheetah/Compiler.py", line 1089, in >>> cleanupState >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** self.commitStrConst() >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** File >>> "/usr/lib/python3/dist-packages/Cheetah/Compiler.py", line 494, in >>> commitStrConst >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** body = escapedNewlineRE.sub('\\1\n', >>> reprstr[i+1:-1]) >>> 2020-12-31T07:32:42-08:00 LockyerHomeServer weewx[2983] ERROR >>> weewx.cheetahgenerator: **** MemoryError >>> 2020-12-31T07:33:19-08:00 LockyerHomeServer /weewxd: weatherflowudp: >>> MainThread: Listening for UDP broadcasts to IP address <broadcast> on port >>> 50222, with timeout 90 and share_socket False... >>> 2020-12-31T07:34:19-08:00 LockyerHomeServer /weewxd: weatherflowudp: >>> MainThread: Listening for UDP broadcasts to IP address <broadcast> on port >>> 50222, with timeout 90 and share_socket False... >>> >>> Here's the output of free at about 07:35 AM: >>> >>> pi@LockyerHomeServer:/home/weewx $ free >>> total used free shared buff/cache >>> available >>> Mem: 8012324 4059728 2206528 684728 1746068 >>> 3011060 >>> Swap: 102396 0 102396 >>> >>> As you can see, this system has 8GB of memory and usage is at about >>> 50%. It's usually in the single digits, definitely < 20%! >>> >>> I've attached an edited syslog from 10:30 PM to this AM. I only removed >>> repetitive WeatherFlowUDP messages. >>> >>> I'm going to first restart weewx to see it that clears the problem. >>> >>> I'm running my BelchertownWxFeeds extension with pretty much every >>> endpoint selected. If a weewx restart doesn't help, I'll cut back / >>> eliminate my extension. >>> >>> Last thing I did last night was add the cmon extension. It appears to >>> be working. But I will eliminate it if problem persists. >>> >>> Finally, I will reboot. >>> >>> Any ideas or suggestions? >>> >>> Regards, >>> >>> Garry >>> >> -- > 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/807eae4f-404c-48bc-9e27-43de1ac73c07n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/807eae4f-404c-48bc-9e27-43de1ac73c07n%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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEAxQaySc-b%3D2aH0dwDadK3A%2BkuKGvovidVsi7%3DYK8FdAw%40mail.gmail.com.
