I was experiencing recurring problems of my DLNA server disappearing from the network. The cause of it was that my network card is configured in a bridge, and the multicast snooping feature wasn’t playing well with DLNA.
To disable the multicast snooping, I’ve created the file
#!/bin/bash echo 0 > /sys/devices/virtual/net/br0/bridge/multicast_snooping
Don’t forget to make it executable. Systemd will run it in every boot.