Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Koel
  3. Koel Unable to Stream Larger Files

Koel Unable to Stream Larger Files

Scheduled Pinned Locked Moved Koel
19 Posts 3 Posters 622 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    crazybrad
    wrote last edited by
    #1

    So I just installed Koel, changed the admin credentials and added another user. All working just fine. I uploaded some m4a files (either ALAC or AAC) and nothing played. I tried FLAC instead and nothing played. Locally (Linux), the files played without issue. Koel supports all 3 formats, so this shouldn't be an issue.

    Tried php artisan koel:doctor (running as www-data user) and all tests passed. x_sendfile was the streaming method. And Apache had the xsendifle module available. So this looked good.

    I notice that PHP Max Upload was 2M and Max POST was 8M. My high quality files were bigger than either. On a hunch, I uploaded a <5MB MP3 file and Koel streamed the file to my Linux laptop via browser.

    My next move was to try and adjust PHP.ini to modify those settings. Unable to edit the files as both www-data and root (read only) .

    I don't know if my hunch is correct. There is nothing I could find in the Koel troubleshooting docs to suggest these parameters could cause a streaming issue.

    Any advice would be appreciated. If someone can suggest a method to modify these limits, I can see if that is causing the problem.

    1 Reply Last reply
    1
    • jamesJ james marked this topic as a regular topic
    • jamesJ james moved this topic from Support
    • jamesJ Offline
      jamesJ Offline
      james
      Staff
      wrote last edited by
      #2

      Hello @crazybrad
      Unfortunately I was not able to reproduce your issue.
      Tested multiple files formats and sizes.
      Can please share more details about your Cloudron setup?
      Are you using Cloudflare and proxying?

      1 Reply Last reply
      1
      • C Offline
        C Offline
        crazybrad
        wrote last edited by
        #3

        @james I'm not using Cloudflare or proxying. Nothing unusual about my Cloudron setup. I am using that particular Cloudron only for SoGo and Koel (as a test). I have 2 songs in my library, one FLAC, one MP3. When I attempt to play the FLAC, it looks like it tries and then skips over the song and goes to the second MP3.

        robiR 1 Reply Last reply
        0
        • C crazybrad

          @james I'm not using Cloudflare or proxying. Nothing unusual about my Cloudron setup. I am using that particular Cloudron only for SoGo and Koel (as a test). I have 2 songs in my library, one FLAC, one MP3. When I attempt to play the FLAC, it looks like it tries and then skips over the song and goes to the second MP3.

          robiR Offline
          robiR Offline
          robi
          wrote last edited by
          #4

          @crazybrad is Koel up to date?

          Conscious tech

          1 Reply Last reply
          0
          • C Offline
            C Offline
            crazybrad
            wrote last edited by
            #5

            @robi It's a brand new installation. Cloudron version is 7.15.1 which matches GitHub master release level.

            1 Reply Last reply
            1
            • robiR Offline
              robiR Offline
              robi
              wrote last edited by
              #6

              Does the demo server have the same issue?

              Conscious tech

              1 Reply Last reply
              0
              • C Offline
                C Offline
                crazybrad
                wrote last edited by
                #7

                No. The demo server (https://demo.koel.dev/#/queue) plays just fine for me. I also have the same issue on Windows, so it does not appear to be Linux related. But interestingly, neither the demo site or my Cloudron instance seems to work on iOS Safari.

                robiR 1 Reply Last reply
                0
                • jamesJ Offline
                  jamesJ Offline
                  james
                  Staff
                  wrote last edited by
                  #8

                  I think I have found something.
                  Regarding the max upload limit.
                  Yes there is /app/data/php.ini where you can add e.g.

                  upload_max_filesize = 5G
                  post_max_size = 5G
                  

                  But, in /app/code/public/.htaccess is the following statement:

                  php_value upload_max_filesize 50M
                  php_value post_max_size 50M
                  

                  This is nullifying the change made to /app/data/php.ini.

                  This is the first part. For this to be fixed, we need to release a new app update for Koel.

                  1 Reply Last reply
                  1
                  • C Offline
                    C Offline
                    crazybrad
                    wrote last edited by
                    #9

                    @james Impressive bit of detective work. Is /app/data/php.ini the proper way to set PHP settings inside Cloudron PHP apps? I understand that /app/code/public/.htaccess overrides this and that is a read-only area.

                    jamesJ 1 Reply Last reply
                    0
                    • jamesJ Offline
                      jamesJ Offline
                      james
                      Staff
                      wrote last edited by james
                      #10

                      Now with a 1.42 GB big .flac file (which still fails to upload with UNKNOWN Error), directly uploaded via the Cloudron Web File manager.
                      The start of the song loads for 60 seconds and then returns a 500 Internal Server Error.
                      Maybe there is some internal issue with Koel and very big .flac files.
                      Smaller .flac files uploaded just fine and played just fine on Windows 11 FireFox, Chrome, Brave (chromium) and also worked on Linux the same browsers.

                      1 Reply Last reply
                      2
                      • C crazybrad

                        @james Impressive bit of detective work. Is /app/data/php.ini the proper way to set PHP settings inside Cloudron PHP apps? I understand that /app/code/public/.htaccess overrides this and that is a read-only area.

                        jamesJ Offline
                        jamesJ Offline
                        james
                        Staff
                        wrote last edited by james
                        #11

                        @crazybrad said in Koel Unable to Stream Larger Files:

                        Is /app/data/php.ini the proper way to set PHP settings inside Cloudron PHP apps?

                        In some apps, yes.
                        Koel is one of these apps that allow custom php.ini configuration.
                        As a rule of thumb, if there is a php.ini in /app/data/ you can put config in there.
                        But, as you can see with this app, sometimes even upstream can place static limitations which are not documented https://github.com/koel/koel/blob/f5588bb519a066bf29afd1085b50f924f90125ec/.htaccess.example#L110-L111

                        Yes, there is a doc section here on the php.ini part:
                        https://github.com/koel/koel/blob/f5588bb519a066bf29afd1085b50f924f90125ec/docs/usage/music-discovery.md?plain=1#L98-L101

                        Depending on how big your files are, you may want to set upload_max_filesize and post_max_size in your php.ini

                        correspondingly, or uploading may fail with a Payload too large error.

                        This applies even if you’re using a cloud storage, as the files will be uploaded to your server first before being sent

                        to the cloud.

                        But the static .htaccess limitation is undocumented.

                        1 Reply Last reply
                        1
                        • jamesJ Offline
                          jamesJ Offline
                          james
                          Staff
                          wrote last edited by james
                          #12

                          @crazybrad
                          Can you share how big the .flac file is you are trying to stream?

                          1 Reply Last reply
                          1
                          • C Offline
                            C Offline
                            crazybrad
                            wrote last edited by
                            #13

                            @james Sure. What's strange is I had no problem uploading .FLAC files at all. Just playing them. Files varied from 12MB up to 30MB.

                            1 Reply Last reply
                            0
                            • C crazybrad

                              No. The demo server (https://demo.koel.dev/#/queue) plays just fine for me. I also have the same issue on Windows, so it does not appear to be Linux related. But interestingly, neither the demo site or my Cloudron instance seems to work on iOS Safari.

                              robiR Offline
                              robiR Offline
                              robi
                              wrote last edited by
                              #14

                              @crazybrad I actually meant Cloudron's demo server to rule out weird network issues, since you see it on windows too.

                              Conscious tech

                              1 Reply Last reply
                              0
                              • jamesJ Offline
                                jamesJ Offline
                                james
                                Staff
                                wrote last edited by
                                #15

                                Hello @crazybrad
                                We just updated the Koel app and added a doc section to increase the upload limit.
                                https://docs.cloudron.io/packages/koel/#increasing-the-upload-limit

                                1 Reply Last reply
                                1
                                • C Offline
                                  C Offline
                                  crazybrad
                                  wrote last edited by
                                  #16

                                  @james Perfect. Koel is working! Thank you. One suggestion, one question. Suggestion: you might want to add the period in the new documentation before htaccess (/app/data/public/.htaccess). Most users will understand the intent, but for inexperienced users, they might take this literally. Question: Based on the size of my FLAC files, I chose 100M as the "size" parameter. Do you have any thoughts on whether we should increase the application RAM to accommodate larger files on both upload and streaming and if yes, how that should scale with "size"?

                                  jamesJ 1 Reply Last reply
                                  0
                                  • C crazybrad

                                    @james Perfect. Koel is working! Thank you. One suggestion, one question. Suggestion: you might want to add the period in the new documentation before htaccess (/app/data/public/.htaccess). Most users will understand the intent, but for inexperienced users, they might take this literally. Question: Based on the size of my FLAC files, I chose 100M as the "size" parameter. Do you have any thoughts on whether we should increase the application RAM to accommodate larger files on both upload and streaming and if yes, how that should scale with "size"?

                                    jamesJ Offline
                                    jamesJ Offline
                                    james
                                    Staff
                                    wrote last edited by
                                    #17

                                    @crazybrad said in Koel Unable to Stream Larger Files:

                                    Suggestion: you might want to add the period in the new documentation before htaccess (/app/data/public/.htaccess). Most users will understand the intent, but for inexperienced users, they might take this literally.

                                    Thanks for the feedback.
                                    The dot generally has no meaning in file manager context or modern stuff for that matter.
                                    Since the dot was/is used to hide files from file managers we decided to not use it in /app/data/ so users will see the file always.

                                    @crazybrad said in Koel Unable to Stream Larger Files:

                                    Question: Based on the size of my FLAC files, I chose 100M as the "size" parameter. Do you have any thoughts on whether we should increase the application RAM to accommodate larger files on both upload and streaming and if yes, how that should scale with "size"?

                                    Unfortunately I can't provide a good answer to this question.
                                    If you see the app struggle with larger files, maybe what you describe is a good option.
                                    Would be happy to get feedback on this topic from you after you gathered some experience from using the app.

                                    1 Reply Last reply
                                    0
                                    • C Offline
                                      C Offline
                                      crazybrad
                                      wrote last edited by
                                      #18

                                      @james My mistake on the .htaccess vs. htaccess. I am so used to using it with the dot and hiding it. I'm happy to experiment with different RAM settings and watch what happens with Koel.

                                      1 Reply Last reply
                                      0
                                      • C Offline
                                        C Offline
                                        crazybrad
                                        wrote last edited by crazybrad
                                        #19

                                        @james Seem to be running into an interesting problem during uploading. So far with 100M as my "size" limits, I am unable to upload FLAC files larger than 50MB. I found out that htaccess, not the .htaccess file I created contained the operative limits: 50M. So by editing the correct file (htaccess) and fixing the limits, both larger FLAC files uploaded. My mistake!

                                        1 Reply Last reply
                                        2
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes


                                        • Login

                                        • Don't have an account? Register

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Bookmarks
                                        • Search