-
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.
-
J james marked this topic as a regular topic
-
J james moved this topic from Support
-
@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.
-
@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.
@crazybrad is Koel up to date?
-
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.
-
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.
-
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 a500 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. -
@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.
@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 customphp.ini
configuration.
As a rule of thumb, if there is aphp.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-L111Yes, 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-L101Depending on how big your files are, you may want to set
upload_max_filesize
andpost_max_size
in yourphp.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. -
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.
@crazybrad I actually meant Cloudron's demo server to rule out weird network issues, since you see it on windows too.
-
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 -
@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"?
-
@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"?
@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. -
@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!