ampache / ampache

A web based audio/video streaming application and file manager allowing you to access your music & videos from anywhere, using almost any internet enabled device.
http://ampache.org
GNU Affero General Public License v3.0
3.52k stars 588 forks source link

Large playlist load stuck #2874

Closed martadinata666 closed 3 years ago

martadinata666 commented 3 years ago

Describe the bug

Playlist not loading on 1000 songs

To reproduce

Steps to reproduce the behavior:

  1. Add large collection music.
  2. Check album, the unknown(orphaned) (because no metadata) album (1145 songs) to be exact. Or add the album to playlist
  3. Press play on album or playlist.
  4. Wait a minute, the web player interface load but doesn't show song list on playlist, the interface became stuck.

Expected behavior

Load playlist and play song as usual. Another playlist/album with abt 100 songs load fine.

Screenshots

stuck

Additional notes

The same playlist load through subsonic client work fine. I just test on web player and subsonic client. Any additional test help kindly accepted. In that state i can click another playlist/album and load fine.

Environment

Client type

usox commented 3 years ago

Hi. Well, I'd say the rendering of the page hits some kind of limit - maybe php's maximum execution time, maybe the memory limit or maybe the browser got stock because of the large amount of data. Can you provide us some logs (apache/php log and/or ampache debug log https://github.com/ampache/ampache/wiki/Troubleshooting)

@lachlan-00 Maybe it's time to prevent big lists from being rendered. Some one will always hit some kind of limit...

martadinata666 commented 3 years ago

Thanks for the response, here i attach the logs to pastebin.

https://pastebin.com/jMqPQcTF

This error i noticed. 2021-04-14T00:43:32+00:00 [dedyms] (Ampache\Module\System\Dba) -> Error_query MSG: ["21S01",1136,"Column count doesn't match value count at row 84"]

From what i traced back is the song is playlist. Even it show correctly in browser. In DB it show as ????.

MariaDB [ampache]> select * from song where id=3012;
+------+--------------------------------------------------------------------------------------------------------------------+---------+-------+------+--------+---------------------------------------------------------------------------------------------+---------+-------+------+---------+------+-------+------+--------+---------+-------------+---------------+-------------+---------+----------+----------+
| id   | file                                                                                                               | catalog | album | year | artist | title                                                                                       | bitrate | rate  | mode | size    | time | track | mbid | played | enabled | update_time | addition_time | user_upload | license | composer | channels |
+------+--------------------------------------------------------------------------------------------------------------------+---------+-------+------+--------+---------------------------------------------------------------------------------------------+---------+-------+------+---------+------+-------+------+--------+---------+-------------+---------------+-------------+---------+----------+----------+
| 3012 | /music/Music/K-Pop/??? ?? ?? ? ??? ?? ????? ?? ????, ????, ???? ?? ?? _ #????_MCOUNTDOWN _ #Diggle-ua_uAAFQOA8.ogg |       3 |   129 |    0 |    185 | ??? ?? ?? ? ??? ?? ????? ?? ????, ????, ???? ?? ??   #???? MCOUNTDOWN   #Diggle-ua uAAFQOA8 |   80086 | 44100 | vbr  | 5952315 |  594 |     0 | NULL |      0 |       1 |  1617969347 |    1617969347 |        NULL |    NULL |          |        2 |
+------+--------------------------------------------------------------------------------------------------------------------+---------+-------+------+--------+---------------------------------------------------------------------------------------------+---------+-------+------+---------+------+-------+------+--------+---------+-------------+---------------+-------------+---------+----------+----------+
1 row in set (0.001 sec)

And all song name that contain non LATIN character (Chinese, Korea, Japan) show as ??? and throw error loading song.

I'm not using official docker image, do i need set something in my DB ? Like charset?

martadinata666 commented 3 years ago

So here is the catch. Some song seems doesn't converted correctly. My end fault, resulted 0 or NULL filesize, that lead to error when load playlist. After cleaned up null songs the playlist load as expected. As subsonic client load the list but the playback skipped.

I will close the issue. thanks.

So maybe this can become a enhancement, like "Skip error songs to add to DB". As i noticed that ampache show error on some songs when adding catalog.

lachlan-00 commented 3 years ago

Thanks for the response, here i attach the logs to pastebin.

https://pastebin.com/jMqPQcTF

This error i noticed. 2021-04-14T00:43:32+00:00 [dedyms] (Ampache\Module\System\Dba) -> Error_query MSG: ["21S01",1136,"Column count doesn't match value count at row 84"]

From what i traced back is the song is playlist. Even it show correctly in browser. In DB it show as ????.

MariaDB [ampache]> select * from song where id=3012;
+------+--------------------------------------------------------------------------------------------------------------------+---------+-------+------+--------+---------------------------------------------------------------------------------------------+---------+-------+------+---------+------+-------+------+--------+---------+-------------+---------------+-------------+---------+----------+----------+
| id   | file                                                                                                               | catalog | album | year | artist | title                                                                                       | bitrate | rate  | mode | size    | time | track | mbid | played | enabled | update_time | addition_time | user_upload | license | composer | channels |
+------+--------------------------------------------------------------------------------------------------------------------+---------+-------+------+--------+---------------------------------------------------------------------------------------------+---------+-------+------+---------+------+-------+------+--------+---------+-------------+---------------+-------------+---------+----------+----------+
| 3012 | /music/Music/K-Pop/??? ?? ?? ? ??? ?? ????? ?? ????, ????, ???? ?? ?? _ #????_MCOUNTDOWN _ #Diggle-ua_uAAFQOA8.ogg |       3 |   129 |    0 |    185 | ??? ?? ?? ? ??? ?? ????? ?? ????, ????, ???? ?? ??   #???? MCOUNTDOWN   #Diggle-ua uAAFQOA8 |   80086 | 44100 | vbr  | 5952315 |  594 |     0 | NULL |      0 |       1 |  1617969347 |    1617969347 |        NULL |    NULL |          |        2 |
+------+--------------------------------------------------------------------------------------------------------------------+---------+-------+------+--------+---------------------------------------------------------------------------------------------+---------+-------+------+---------+------+-------+------+--------+---------+-------------+---------------+-------------+---------+----------+----------+
1 row in set (0.001 sec)

And all song name that contain non LATIN character (Chinese, Korea, Japan) show as ??? and throw error loading song.

I'm not using official docker image, do i need set something in my DB ? Like charset?

charset can be set in the config file. in ampache 5 it will be mb4 by default but you can set any collation you'd like. image