Problems with library update

Problems with library update

One of the problems reported by O!MPD’s users is the interruption of update process. This can have several reasons. Some of them are described below.

Server configuration

Update process can be interrupted by PHP service. When you use OPcache and you find in php log file info like this:

WARNING: [pool www] child 3624 exited on signal 9 (SIGKILL) after 188.998235 seconds from start

then you probably need to increase opcache.force_restart_timeout. Go to your php.ini file, uncomment line with opcache.force_restart_timeout and set its value to some large number, like 180000. Restart PHP service and start update process. If that was the reason then update should now be successful.

Error during getting info from files

However the most common problem is error in reading tags from music file. In this case you need to identify file causing error. First turn on debug mode: in config.inc.php change $cfg['debug'] to true. Make sure that your web server has write access to /ompd/tmp/ directory. Next start new update. When process stops, open /ompd/tmp/update_log.txt and go to the end of this file. There you’ll find name of last processed file – the one that probably broke the update process. Try to investigate if it really did: simply remove this file (or whole directory this file is in) and restart update process. You can also open this file in a tag editor (like mp3tag) and review tags: pay attention to any unusual characters in text fields and numbers in numeric fields (like YEAR or DATE). Try to correct them and restart update once again.

Sometimes it turns out that file is broken (it is not possible to read tags from it at all) – than try to fix it in a tag editor.

Cancel broken update

If you want to cancel previously broken update, go to setting page, scroll to Update, click last dot in Update in progress… and click red x. This actually doesn’t stop update process but clears update flag in database and lets you to start new update process.

Last resort

If you still have problems with update don’t hesitate to write to me or report issue on GitHub.

2 thoughts on “Problems with library update

  1. Robert Rathbone

    Raspberry Pi 4 with 64-Bit Bookworm
    I have the following problem with /etc/chatscripts
    Update error!

    Failed to open directory:
    /etc/chatscripts
    Check media_dir value in Settings -> Config
    Check file permission

    Cancel update

    Permissions
    drwxr-s— 2 root dip 4096 Jul 4 01:06 chatscripts

    Of course I see the problem is permissions but what is the best way to handle this.
    I couldn’t find media_dir in the settings (advanced settings) screen

    1. Artur Sierżant Post author

      Hello Robert,

      media_dir can be found in Settings->Media update options->Media directory. This option is wrongly named in error message (it was correct before I moved this option to GUI), I’ve already corrected it on GitHub. Thanks for reporting this.
      So please check value of above field. Basically it should be the same as music_directory in mpd.conf – it’s /mnt/Music in my case. Permissions should be set in a way that allows your web server to read it – I have rwxr-xr-x.

      Regards,
      Artur

Leave a Reply

Your email address will not be published. Required fields are marked *