• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pilight-daemon: cpu usage too high when using sendmail
#1
Hi,

sorry for another thread for this topic, but I read all similar entries and wasn't able to find my bug.

pilight-daemon crashes when a sendmail action was triggered


Code:
cat  /var/log/pilight.log
[ Jan 10 20:57:35:38633] pilight-daemon: INFO: datetime CDT_Essen 7.011555:51.455643 seems to be in timezone: Europe/Berlin
[ Jan 10 20:57:35:43261] pilight-daemon: INFO: rule #1 temp-to-high-mail was parsed in 0.001895 seconds
[ Jan 10 20:57:35:43999] pilight-daemon: INFO: rule #2 temp-to-high-switch was parsed in 0.000688 seconds
[ Jan 10 20:57:35:45141] pilight-daemon: INFO: rule #3 sendmail_when_switch was parsed in 0.001097 seconds
[ Jan 10 20:57:35:48742] pilight-daemon: INFO: version v8.0.4
[Jan 10 20:57:35:153268] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Jan 10 20:57:35:166153] pilight-daemon: INFO: daemon listening to port: 43983
[Jan 10 20:57:35:169610] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 51120
[Jan 10 20:57:35:173837] pilight-daemon: INFO: secured webserver started on port: 5002 (fd 15)
[Jan 10 20:57:35:173950] pilight-daemon: INFO: regular webserver started on port: 5001 (fd 16)
[Jan 10 20:57:35:283466] pilight-daemon: INFO: new client, ip: 192.168.1.27, port: 53842
[Jan 10 20:58:00:969863] pilight-daemon: INFO: executed rule: sendmail_when_switch
[Jan 10 20:58:05:963256] pilight-daemon: cpu usage too high 100.342146%, will abort when this persists
[Jan 10 20:58:08:963261] pilight-daemon: cpu usage too high 106.162376%, will abort when this persists


relevant config looks like this
Code:
    "rules": {
        "sendmail_when_switch": {
            "rule": "IF FunkSteck_A.state IS on AND CDT_Essen.second == 0 THEN sendmail SUBJECT mail MESSAGE not working TO some@where.de",
            "active": 1
        },


    "settings": {
        "log-level":                 6,
        "pid-file":                 "/var/run/pilight.pid",
        "log-file":                 "/var/log/pilight.log",
        "stats-enable":             1,
        "watchdog-enable":             1,
        "webserver-enable":         1,
        "webserver-root":             "/usr/local/share/pilight/webgui",
        "webserver-http-port":         5001,
        "webserver-cache":             1,
        "gpio-platform":             "raspberrypi3",
        "smtp-sender":                 "pit.raspberry@gmx.de",
        "smtp-host":                 "mail.gmx.net",
        "smtp-port":                 465,
        "smtp-user":                 "pit.raspberry@gmx.de",
        "smtp-password":             "secret",
        "smtp-ssl":                    0

can anybody help me?
what further information is required for this?

thank you!
 
Reply
#2
1. Make sure that your server doesn't require ipv6. You can check that using ping.
2. Make sure that your server doesn't require ssl. You can check that using ping.

If both are false, then you've probably hit the bug discussed the last weeks:
https://forum.pilight.org/showthread.php?tid=3223

A fixed will be released soon.
 
Reply
#3
thanks for your quick Response.
both is checked.
so i'm patient and wait for a fix.
kind regards....
 
Reply
#4
just saw the new version 8.0.5 including the fix
thanks for your work! I do appreciate that.

unfortunately I still get this error when sendmail action was triggered.

currently the daemon does not crash as it did in 8.0.4

the mail was not send either
config was checked and seems to be ok.
anyway, I tried a wrong email configuration in order to invoke another error message, but didn't got one

pi is properly connect to internet
Code:
pi@raspberrypi:/etc/pilight $ ping mail.gmx.net
PING mail.gmx.net (212.227.17.190) 56(84) bytes of data.
64 bytes from mail.gmx.net (212.227.17.190): icmp_seq=1 ttl=247 time=24.7 ms

Is the any possibility to get more information? I'm not a programmmer :-(

log level is alredy set to 6

Code:
pi@raspberrypi:/etc/pilight $ tail -f /var/log/pilight.log
[Jan 12 14:19:47:906633] pilight-daemon: INFO: version v8.0.5
[ Jan 12 14:19:48:10608] pilight-daemon: INFO: no pilight daemon found, daemonizing
[ Jan 12 14:19:48:23517] pilight-daemon: INFO: daemon listening to port: 36505
[ Jan 12 14:19:48:34314] pilight-daemon: INFO: secured webserver started on port: 5002 (fd 16)
[ Jan 12 14:19:48:34452] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 58418
[ Jan 12 14:19:48:34556] pilight-daemon: INFO: regular webserver started on port: 5001 (fd 17)
[Jan 12 14:19:48:140816] pilight-daemon: INFO: new client, ip: 192.168.1.27, port: 35768
[Jan 12 14:19:50:958700] pilight-daemon: NOTICE: could not reach api.openweathermap.org
[Jan 12 14:19:50:964178] pilight-daemon: NOTICE: could not reach api.openweathermap.org
[Jan 12 14:19:50:964655] pilight-daemon: NOTICE: could not reach api.openweathermap.org
[Jan 12 14:21:00:875785] pilight-daemon: INFO: executed rule: sendmail_when_switch
[Jan 12 14:21:06:868602] pilight-daemon: cpu usage too high 114.285806%, will abort when this persists
[Jan 12 14:21:09:868603] pilight-daemon: cpu usage too high 114.378584%, will abort when this persists
[Jan 12 14:21:10:951204] pilight-daemon: NOTICE: failed to send sendmail action message with subject "mail" to pit.raspberry@gmx.de
[Jan 12 14:22:00:875153] pilight-daemon: INFO: executed rule: sendmail_when_switch
[Jan 12 14:22:06:868603] pilight-daemon: cpu usage too high 113.975400%, will abort when this persists
[Jan 12 14:22:09:868599] pilight-daemon: cpu usage too high 114.055382%, will abort when this persists
[Jan 12 14:22:10:938474] pilight-daemon: NOTICE: failed to send sendmail action message with subject "mail" to pit.raspberry@gmx.de
[Jan 12 14:23:00:876864] pilight-daemon: INFO: executed rule: sendmail_when_switch
[Jan 12 14:23:03:868637] pilight-daemon: cpu usage too high 90.386097%, will abort when this persists
[Jan 12 14:23:06:868646] pilight-daemon: cpu usage too high 124.895227%, will abort when this persists
[Jan 12 14:23:09:868643] pilight-daemon: cpu usage too high 125.698900%, will abort when this persists
[Jan 12 14:23:10:947355] pilight-daemon: NOTICE: failed to send sendmail action message with subject "mail" to pit.raspberry@gmx.de
[Jan 12 14:24:00:875189] pilight-daemon: INFO: executed rule: sendmail_when_switch
[Jan 12 14:24:06:868603] pilight-daemon: cpu usage too high 113.641469%, will abort when this persists
[Jan 12 14:24:09:868605] pilight-daemon: cpu usage too high 114.292033%, will abort when this persists
[Jan 12 14:24:10:961341] pilight-daemon: NOTICE: failed to send sendmail action message with subject "mail" to pit.raspberry@gmx.de
[Jan 12 14:25:00:876892] pilight-daemon: INFO: executed rule: sendmail_when_switch
[Jan 12 14:25:06:868599] pilight-daemon: cpu usage too high 113.387400%, will abort when this persists
[Jan 12 14:25:09:868594] pilight-daemon: cpu usage too high 113.516235%, will abort when this persists
[Jan 12 14:25:10:941871] pilight-daemon: NOTICE: failed to send sendmail action message with subject "mail" to pit.raspberry@gmx.de
[Jan 12 14:26:00:882150] pilight-daemon: INFO: executed rule: sendmail_when_switch
[Jan 12 14:26:03:870614] pilight-daemon: cpu usage too high 112.141551%, will abort when this persists
[Jan 12 14:26:06:870612] pilight-daemon: cpu usage too high 113.812950%, will abort when this persists
[Jan 12 14:26:09:870611] pilight-daemon: cpu usage too high 113.364060%, will abort when this persists
[Jan 12 14:26:10:948483] pilight-daemon: NOTICE: failed to send sendmail action message with subject "mail" to pit.raspberry@gmx.de
 
Reply
#5
Can you retry with:
Code:
pilight-daemon --debug-level=1
 
Reply
#6
(01-12-2018, 04:51 PM)curlymo Wrote: Can you retry with:
Code:
pilight-daemon --debug-level=1

finally it works now :-)

I reduced my config file
and reconfigured my ssmtp installation (port needs to be 587)


no further help required!
thank you for helping again:-)
 
Reply
#7
Always use code tags please. Also, can you maybe compile the development version of pilight and run it with:
Code:
pilight-daemon --debuglevel=2
Debug level 1 is not high enough to provide the correct info.
 
Reply
#8
(01-16-2018, 08:52 PM)curlymo Wrote: Always use code tags please. Also, can you maybe compile the development version of pilight and run it with:
Code:
pilight-daemon --debuglevel=2
Debug level 1 is not high enough to provide the correct info.

8.0.6 is installed, but debuglevel=2 is not accepted
I got this response

Code:
pi@raspberrypi:~ $ sudo pilight-daemon --debuglevel=2

Usage: pilight-daemon [options]
         -H --help                      display usage summary
         -V --version                   display version
         -C --config                    config file
         -S --server=x.x.x.x            connect to server address
         -P --port=xxxx                 connect to server port
         -F --foreground                do not daemonize
         -D --debug                     do not daemonize and
                                        show debug information
            --stacktracer               show internal function calls
            --threadprofiler            show per thread cpu usage
            --debuglevel                show additional development info

        The following GPIO platforms are supported:
        - none
        - odroidxu4
        - odroidc2
 
Reply
#9
That's why i asked to to compile the development version of pilight
 
Reply
#10
(01-17-2018, 06:32 PM)curlymo Wrote: That's why i asked to to compile the development version of pilight

sorry, I read your comment but thought you included that in 8.0.6 anyway (which I misinterpreted)
I did not know how to compile the version and didn'd have the time to learn how to.


Meanwhile I realized you released 8.0.7 also including a "fix" for openweathermap.
good to know the reason for that problem, too.

meanwhile I fixed my mail issue and the openweathermap api key is the next step.
looking forward to get rid of that "trouble".
Thanks for your time and again for your quick help :-)
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight for Raspbian Buster (raspberry pi 4) ? starob 32 7,494 08-10-2020, 09:12 AM
Last Post: simanuel
  pilight switch node in node-red framp 0 252 06-24-2020, 10:01 PM
Last Post: framp
  pilight-control TML 13 941 05-27-2020, 07:51 AM
Last Post: curlymo
  100% CPU usage DSLeX 4 290 05-26-2020, 12:37 PM
Last Post: DSLeX
  API Requests by HTTP from other devices fore use in pilight scootermacro 2 437 05-10-2020, 08:19 AM
Last Post: scootermacro
  pilight-send seems successful but doesn't actually send RF signal ayeyebrazov 37 3,217 03-31-2020, 01:02 PM
Last Post: curlymo
  pilight 8.1.5 not working on Raspberry pi after reboot beejayf 4 888 03-08-2020, 12:14 AM
Last Post: beejayf
  pilight cpu usage possibly associated with noticeable sluggishness? hepcat72 4 941 01-28-2020, 08:02 PM
Last Post: hepcat72
  apt.pilight.org stable Release' is not signed. thomasol 2 973 01-23-2020, 11:34 PM
Last Post: thomasol
  pilight and SIGNALduino cc1101 Caleus 0 721 01-19-2020, 09:13 AM
Last Post: Caleus

Forum Jump:


Browsing: 1 Guest(s)