Problem with pydpiper

If something seems really buggy, report it here!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

Problem with pydpiper

Postby Saiyato » Mon Oct 21 2019 13:55

This helps like a lot, I will try to reproduce on my 3B+ instead of the 3B I use normally. That Pi is a bit different from the previous ones, so the difference might be in the Pi3B+... Will check, but it'll take some time to investigate, don't expect a fix this week :P (I won't be home a lot)
Just.Love.Music.
User avatar
Saiyato
Golden Ear
Golden Ear
 
Posts: 627
Joined: Wed Dec 23 2015 07:58
Location: Woudenberg, Netherlands

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


Problem with pydpiper

Postby learner » Fri Oct 25 2019 06:07

Hi,
I've got some results with clean Volumio 2.657.
Installation consists of pydPiper plugin, ir controller plugin, gpio buttons plugin, backup& restore plugin and autostart plugin. All of them are working right after installation. I have not mount music on NAS. So all tests was done with the webradio.
After reboot I see pydPiper starting before the music begins and all is fine. Then webradio starts with music. LCD shows info about it during some seconds, and then begins to show blinking garbage. I did 'docker ps' and saw two containers. One running from the start and the second making garbage on display, because of two copies of pydpiper are fighting for one display.
I can stop them by 'docker stop name' and start again pydPiper (only one). After this it is working till next reboot.
I've tried to set pydPiper plugin to off in webUI. Then all is fine: plugin starts before music (why? it was set to off?) and correctly run whithout garbage on screen. 'docker ps' shows one running conteiner.
Random avatar
learner
Sunday DIYer
Sunday DIYer
 
Posts: 12
Joined: Thu Oct 17 2019 04:52


Problem with pydpiper

Postby Saiyato » Tue Oct 29 2019 08:18

Good morning,

Last night I did a quick test, I still need to test on the 3B+, so that might still be problematic... but I installed everything on the Pi2B and only one docker container was up, even after rebooting. This is good, so we might have some problems for Pi3B+ models, which have slightly different hardware. As previously, I can't make any promises in terms of time, I won't be in a position to test till Sunday late in the afternoon; and even then I'm lacking time ;) But I'm sure it's something stupidly simple and has to do with previously being unable to test against a 3B+
Just.Love.Music.
User avatar
Saiyato
Golden Ear
Golden Ear
 
Posts: 627
Joined: Wed Dec 23 2015 07:58
Location: Woudenberg, Netherlands


Problem with pydpiper

Postby learner » Wed Oct 30 2019 16:46

Thank you,
your plugins are realy great.
I've stopped strugling with pydPiper plugin. It was not becouse of two simultanious copies but because it surely hanging my system right after music starts. I didn't know what to do with it.
Instead of pydPiper I installed your hd44780 plugin with some corrections in mpdlcd.conf and display-fields.py files. It's working not so nice as pydPiper do. But it never tried to hang the whole system.

Thank you, I'l be glad to know if you have new results with Pi3B+.
Random avatar
learner
Sunday DIYer
Sunday DIYer
 
Posts: 12
Joined: Thu Oct 17 2019 04:52


Problem with pydpiper

Postby Saiyato » Sun Nov 03 2019 22:20

Thanks mate! :)

I ran some tests this weekend, it took some time to find the culprit, but I think I found it. For some reason, the plugin was started by the system itself (autostart) AND Volumio (plugin), but this didn't result in a restart of the already running instance and instead fired up a second one. Not sure how this problem surfaced without any notable changes.

Luckily the fix was pretty easy and I fixed something else as well.

Fix #1:
The system would only exit a container upon reboot/service restart, this resulted in many exited containers over time (I had like 50-ish). The fix was to update the unit file and add the
Code: Select all
 --rm
parameter.

You can cleanup your system by calling:
Code: Select all
sudo docker system prune -a


Fix #2:
As said, the system would start one instance and Volumio the second. I updated the install script to disable the service, effectively disabling auto-start and symlink the new unit file (as per usual).

This doesn't fix your installations of course, so I prepped some statements to fix your current installation:
Code: Select all
sudo /etc/init.d/docker restart
systemctl disable pydpiper.service
sudo wget -O /home/volumio/pydPiper/pydPiper.py https://raw.githubusercontent.com/Saiyato/volumio-pydpiper-plugin/master/templates/pydPiper.py
wget -O /data/plugins/accessory/pydpiper/index.js https://raw.githubusercontent.com/Saiyato/volumio-pydpiper-plugin/master/index.js
wget -O /data/plugins/accessory/pydpiper/unit/pydpiper.service https://raw.githubusercontent.com/Saiyato/volumio-pydpiper-plugin/master/unit/pydpiper.service
sudo ln -fs /data/plugins/accessory/pydpiper/unit/pydpiper.service /etc/systemd/system/pydpiper.service
systemctl daemon-reload
systemctl restart volumio


Then, if you want, you can cleanup the obsolete containers with:
Code: Select all
sudo docker system prune -a


If someone can test as well, I will create a PR for the patches :)
Just.Love.Music.
User avatar
Saiyato
Golden Ear
Golden Ear
 
Posts: 627
Joined: Wed Dec 23 2015 07:58
Location: Woudenberg, Netherlands


Problem with pydpiper

Postby learner » Tue Nov 05 2019 15:20

Hi, Saiyato

Very many thanks to you for your time and your thoughts to solve my problem. I wil try this fixes on weekend. Surely they will help.

Thank you and good luck
Random avatar
learner
Sunday DIYer
Sunday DIYer
 
Posts: 12
Joined: Thu Oct 17 2019 04:52


Problem with pydpiper

Postby learner » Mon Nov 11 2019 05:36

Hi, Saiyato

I tried and it works. All is right, only one instance of pydPiper is running.
Thank you, your code is usefull.
Now I face the next problem. All is fine when working with small database. And when I have big database installed Volumio with pydPiper crashes during reboot. In this case "small" is about 300 artists, 2500 songs and "big" is more than 13000 artists and 190000 songs.
Only pydPiper lead Volumio to crash down, cause it run with any other set of plugins. Of course HD44780-plugin is running.

Do not know what is the next step to manage pydPiper.

Thank you, and many thanks if you have any new ideas.
Random avatar
learner
Sunday DIYer
Sunday DIYer
 
Posts: 12
Joined: Thu Oct 17 2019 04:52


Problem with pydpiper

Postby Saiyato » Yesterday 10:33

Hi,

I don't think my database is that big, I should check, but iirc I'm at around 22k songs. My guess is that Volumio (or NodeJS) needs resources to boot up and pydPiper is quite cpu hungry (python will be very high when requesting "top").

I can't really influence that behaviour, so my best guess would be to delay the plugin, not sure if the systems allows for delayed startup of plugins. I could simply add a delay to the unit file, but this would also apply if you restart the service; then again... how often do you need to restart the service and will it be really disruptive? ;)

Can you benchmark how long it takes to boot up with your 190k songs as opposed to 2500 songs? I can benchmark my boot time and maybe extrapolate the multiplier. All without plugins enabled of course ;)
Just.Love.Music.
User avatar
Saiyato
Golden Ear
Golden Ear
 
Posts: 627
Joined: Wed Dec 23 2015 07:58
Location: Woudenberg, Netherlands


Problem with pydpiper

Postby learner » Yesterday 11:31

Of course, I prefer not to restart it at all. But sometimes it happens and if it was with pydPiper - then I need to rise Volumio from backup. It is not so nice if I have to wait long time to scan NAS.
Now it's running with hd44780 plugin. More then a week, I think.

Thank you, I will try again for further experience.
Random avatar
learner
Sunday DIYer
Sunday DIYer
 
Posts: 12
Joined: Thu Oct 17 2019 04:52


Problem with pydpiper

Postby learner » Yesterday 16:52

P.S. It takes about 14 minutes to boot. Sometimes - beetwin 12 and 16. Everybody want to know, why so long and what is the need of checking the whole base.
Random avatar
learner
Sunday DIYer
Sunday DIYer
 
Posts: 12
Joined: Thu Oct 17 2019 04:52

Previous

Return to Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest