There are some cases when MPD will refuse client connection or terminate a client connection without the client being able to know the reason.
There are some preemptive workarounds for such cases.
The MPD log file is the best way to begin troubleshooting what exactly the connection problem is.
MPD Log File
The first step is to enable the log file and set the logging level. See MPD documentation.
The location of the MPD log file is system dependant.
Check the log_file
configuration in your MPD configuration file, and set the log_level
to verbose
either in the configuration file or on the command line.
Max Client Connections
There’s a limit on the number of client connections in MPD.
If the limit was reached a subsequent connection will be refused.
MPD log: client: Max connections reached
Workaround: increase max_connections
in MPD configuration.
MAFA normally uses a single connection to MPD, but may use more than one connection in the following cases:
- When testing the connection to MPD in the servers list.
- When loading playlist files.
- When loading recently updated items.
- When searching.
- When loading album art. (Configurable from: Settings → Album art → Album art on separate connection)
MPD Output Buffer Size
There’s a limit on the size of the response that MPD can send back to the client.
If the limit was reached MPD will terminate the client connection without sending an error message to the client.
MPD log: client: error on client 1: Output buffer is full
Workaround: increase max_output_buffer_size
in MPD configuration.
Another workaround: limit the tags used by the MPD or the client. For example, if there are huge comment tags, you can
disable the comment tag either in MAFA or in MPD configuration metadata_to_use
.
MPD Protocol Violations
Only MPD protocol is supported. Other music players claiming to be MPD compatible are supported only as far as they are compatible with the MPD protocol, or expose direct connection to an MPD instance they manage.
If a compatible server violates the protocol, MAFA will not be able to read and parse the response for each command.