Restart mopidy frequently

Hello,
I’m running Mopidy and Mopify in a RPi and it works great. I have however a problem since after a while when Mopidy is not used, I have to reboot the whole RPi to make it work again.

I’m not running it yet as service, I have instead a line in crontab so that Mopidy starts at reboot
@reboot mopidy’ and this works as expected.

Other specifics: latest versions of os and mopidy, using the HDMI with a soundbar

Is there anybody else having a similar problem?
Is it better to run mopidy as a service?
Any other hints or checks I can do?

Best regards, Walter

There are now a number of different operating systems for the Raspberry Pi. Can we assume you are using Raspbian? The suggested method would be to use the service so please try that first.

Thank you, yes Raspbian, I will try to configure as service and see if it helps
Thnaks

Hello again,
After running Mopidy successfully as service for a couple of days, it has now stopped responding again. The process is running when I check with ‘ps aux’, 124 hours but no response to commands on port 6680

Also the mopidy.log is empty (level set to critical)

Raspbian is not very latest but 2014-12-24-wheezy-raspbian.img, rather new

Nothing else in the RPi, it is reserved for Mopidy

Restarting service helped but should not be necessary?

Does it respond to mpd commands while in this state. Can you run with the
log level set to ‘info’. Can you use something like top to verify it’s not
a ram limit. which model are you running on and with what cpu/gpu memory
split?

Hello,¨
Restarted the service with log level INFO, now I will wait until it stops again. The model is the B model with 512 Mb RAM.
I have not not made any memory splits between CPU/GPU, everything is default.

mpd is enabled on port 6600. What kind of command should I try once not responding on 6680?

I think any MPD command will do if you are just trying to get a response out of it - status ?

So now it stopped responding again. Also MPD is stopped responding. Only way out is now to restart the mopidy service. I have copied som log files (.gz) but I have not looked into them yet

In the log i have a number of these exceptions, seems to be some problem in Tornado:

2015-03-04 13:07:13,098 WARNING [7294:HttpServer] root: Read error on 27: [Errno 104] Connection reset by peer
2015-03-04 13:07:13,114 WARNING [7294:HttpServer] root: error on read
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/tornado/iostream.py”, line 354, in _handle_read
if self._read_to_buffer() == 0:
File “/usr/lib/python2.7/dist-packages/tornado/iostream.py”, line 421, in _read_to_buffer
chunk = self._read_from_socket()
File “/usr/lib/python2.7/dist-packages/tornado/iostream.py”, line 402, in _read_from_socket
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 104] Connection reset by peer

Using top I get this:

Right now I think a daily healthy restart mopidy service as entry in crontab is something I consider