Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSMR_Backend continues to crash #206

Closed
maxxie85 opened this issue May 11, 2021 · 8 comments
Closed

DSMR_Backend continues to crash #206

maxxie85 opened this issue May 11, 2021 · 8 comments

Comments

@maxxie85
Copy link

maxxie85 commented May 11, 2021

Hi Xirixiz,

I noticed increades CPU usage on my server and saw it was caused by dsm-reader-docker. Inspecting the log files shows that the dsmr_backend process exits (code 0) and then restarts about every 10 seconds.

Host is a debian 10 VM with all packages up to date (at this time of writing).

DSMR-reader-docker version is tagged to latest which now matches latest-2021.05.02-amd64
For the database I'm running the latest official postgress 11 image.

I would like to help you identify this issue if you require.

@JayOne73
Copy link

I can confirm this behaviour on two installs, one on Synology (Docker) and one on a LXC (Proxmox, Docker).

@xirixiz
Copy link
Owner

xirixiz commented May 11, 2021

I'll look into it Tonight. Did you check the changelog of dsmr reader? Maybe it's related to the latest release (released Yesterday).

@JayOne73
Copy link

JayOne73 commented May 11, 2021

After setting the QoS within the MQTT configuration to 2 it looks like that the backend stays up without crashes.

Edit: after setting the QoS back to 0, the backend keeps on crashing.

@xirixiz
Copy link
Owner

xirixiz commented May 11, 2021

Thanks for helping out! Do you have MQTT enabled? I didn't have any issue, but maybe that's because I disabled MQTT.

@maxxie85
Copy link
Author

Yes I also noticed the change in the changelog of the latest version of dsmr.
I do use MQTT and had the QoS on level 0, changed it to QoS level 2 and the proces doesn't crash anymore.
So for this project the problem seems resolved (or worked around)

Strange that is does on QoS 0, as the MQTT broker is running on the same VM, so the connection should be very stable. But that is not due to this project

@xirixiz
Copy link
Owner

xirixiz commented May 11, 2021

You can also update it directly in the database if you'd like to:

Update:

echo "UPDATE dsmr_mqtt_mqttbrokersettings SET qos = 2;" | docker exec -i dsmrdb psql -U dsmrreader -d dsmrreader

Verify:

echo "SELECT * from dsmr_mqtt_mqttbrokersettings;" | docker exec -i dsmrdb psql -U dsmrreader -d dsmrreader

@dennissiemensma Maybe nice to have this information if someone is experiencing the same behaviour without Docker.

@dennissiemensma
Copy link
Contributor

Thanks! Het is idd bijeffect van de release van gisteren: dsmrreader/dsmr-reader#1383 (comment)

Ik hoop vanavond 4.16.1 met daarin een fix te releasen. De workaround is voor nu idd om QoS level 1 of 2 te gebruiken. Het is alleen een issue wanneer MQTT aan staat.

De oorzaak is dat in de nieuwe release onbedoeld geen netwerk loop meer aangeroepen wordt bij QoS 0, daardoor wordt er in die situatie geen MQTT-netwerkverkeer afgehandeld en concludeert de MQTT-client in DSMR-reader dat de verbinding weg is, en vraagt de backend te herstarten om vervolgens weer hetzelfde te doen.

@dennissiemensma
Copy link
Contributor

Er is nu een patch release v4.16.1

Dat zou het moeten oplossen al blijft het voor mij handwerk om te testen, gezien ik netwerkgedrag niet (betrouwbaar) onder automatische tests kan zetten en het daarmee altijd wat kwestbaarder is bij wijzigingen. Dus mochten er alsnog issues zijn, ik hoor het graag!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants