Cannot increase max upload size
-
I've tried increasing it both in the Pixelfed settings at
/i/admin/settings
And directly editing the
env.production
file using the File Manager (note: editing the settings within Pixelfed admin doesn't seem to effect this file at all, which presumably it should)And have restarted the app etc.
But whatever I do, it still says the max is 15MB (instead of the new ~150 146MB limit I've set):
-
@jdaviescoates said in Cannot increase max upload size:
@nebulon you've probably thought of this already, but possible clue here:
https://github.com/pixelfed/support/issues/56#issuecomment-542843670
Yep!
Increasing the Max Upload values in the app admin settings, and in
env.production
(not actually sure if you need to do both?), and then running the cache clearing commands as shown in the docsAnd then adding this:
; Maximum allowed size for uploaded files. upload_max_filesize = 150M ; Must be greater than or equal to upload_max_filesize post_max_size = 150M
To
php.ini
using the File ManagerAnd then restarting the app.
Made it work!
-
Ah-ha!
Running these commands in the terminal, as shown in the docs here, to clear the cache, and then restarting the app again seemed to do the trick!
# sudo -u www-data php artisan cache:clear # sudo -u www-data php artisan optimize:clear # sudo -u www-data php artisan optimize
-
-
-
Oh, but uploading a 72MB video still isn't actually working
It gets to 100% and then just shows this
I see this in the logs:
Sep 27 00:09:322023/09/26 23:09:32 [error] 76#76: *150 client intended to send too large body: 72204366 bytes, client: 172.18.0.1, server: _, request: "POST /api/compose/v0/media/upload HTTP/1.1", host: "bridport.pics", referrer: "https://bridport.pics/i/web/compose"
How is it too large when I've set the max to higher than that?
-
-
-
@jdaviescoates said in Cannot increase max upload size:
I see this in the logs:
Sep 27 00:09:322023/09/26 23:09:32 [error] 76#76: *150 client intended to send too large body: 72204366 bytes, client: 172.18.0.1, server: _, request: "POST /api/compose/v0/media/upload HTTP/1.1", host: "bridport.pics", referrer: "https://bridport.pics/i/web/compose"
How is it too large when I've set the max to higher than that?
A quick search would seem to suggest this is an Nginx error so methinks perhaps @Staff need to adjust the Pixelfed app package to fix it?
-
@jdaviescoates the nginx allows unlimited body sizes and uploads, it's up to the app to restrict however it wants.
I am guessing this is an issue because of pixelfed's apache configuration. Let me check.
-
@girish said in Cannot increase max upload size:
Turns out there is a nginx inside pixelfed, forgot about that. @jdaviescoates does it work with the latest package?
I'll let you know as soon as my backup completes (somehow it seems to be taking longer than ever - and quite often seems to completely stall - since I moved everything to a dedicated server... looking forward to the various additional backup improvements/ options coming soon...)
-
@girish said in Cannot increase max upload size:
Turns out there is a nginx inside pixelfed, forgot about that. @jdaviescoates does it work with the latest package?
Nope.
But now getting a different error:
Sep 27 09:18:062023/09/27 08:18:06 [error] 64#64: *104 FastCGI sent in stderr: "PHP message: PHP Warning: POST Content-Length of 72204366 bytes exceeds the limit of 67108864 bytes in Unknown on line 0" while reading response header from upstream, client: 172.18.0.1, server: _, request: "POST /api/compose/v0/media/upload HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.1-fpm.sock:", host: "bridport.pics", referrer: "https://bridport.pics/i/web/compose"
-
@nebulon said in Cannot increase max upload size:
I was trying to reproduce this, but for some reason I can't find out how to enable video uploads or are you trying to upload a gif or so which is that large?
No a .mp4 video.
Perhaps try these Media Types setting at the bottom of
/i/admin/settings
-> Media -
@nebulon said in Cannot increase max upload size:
Still hunting for that...
Thanks!
But yeah
67108864 bytes in Unknown on line 0
doesn't seem to really give much of a clue does it!Here's hoping you find it somewhere!
-
@nebulon you've probably thought of this already, but possible clue here:
https://github.com/pixelfed/support/issues/56#issuecomment-542843670
-
@jdaviescoates said in Cannot increase max upload size:
@nebulon you've probably thought of this already, but possible clue here:
https://github.com/pixelfed/support/issues/56#issuecomment-542843670
Yep!
Increasing the Max Upload values in the app admin settings, and in
env.production
(not actually sure if you need to do both?), and then running the cache clearing commands as shown in the docsAnd then adding this:
; Maximum allowed size for uploaded files. upload_max_filesize = 150M ; Must be greater than or equal to upload_max_filesize post_max_size = 150M
To
php.ini
using the File ManagerAnd then restarting the app.
Made it work!
-