Giter Site home page Giter Site logo

Comments (34)

lapineige avatar lapineige commented on May 26, 2024 1

Edit: I just tried to upload an image, and it won't let me upload anything larger than 500KB, previously it let me up to 2MB

WTF is happening…

If you comment out those lines in php pixelfed.conf file (and reload php service) does it come back to the previous state ?

edit: I wonder, but I have no idea if that's true, if the memory limit is not too low… you could try to test it with huge values for each field, like 500M

from pixelfed_ynh.

mikail97 avatar mikail97 commented on May 26, 2024 1

If you comment out those lines in php pixelfed.conf file (and reload php service) does it come back to the previous state ?

I erased the lines and, yes, it does

edit: I wonder, but I have no idea if that's true, if the memory limit is not too low… you could try to test it with huge values for each field, like 500M

I put 500M in each field, both in the php and in the nginx and it works
Thank you so much <3

Whenever I change the configuration from the web interface and give "save", I get this "Something went wrong
We cannot process your request at this time, please try again later. Go back to Pixelfed. "
Why?

from pixelfed_ynh.

sthaydn avatar sthaydn commented on May 26, 2024 1

Hi,

that was the issue for me as well. I wasn't able to upload pics with more then 2M, while pixelfeld says it should be 25M.
php_admin_value[upload_max_filesize] = 25M
adding to the pixelfed.conf inside /etc/php/7.3/pool.d/ did the trick.

Would it be a good idea to have that line as standard for the installation process? As yunohost should be for people with not as much knowledge (like myself) it would be great to achieve changing the setting inside pixelfed should be enough. So maybe having set this value to 100M for example would be a good choice, even when people will post large pics the pixelfed value could be changed.

from pixelfed_ynh.

twnl avatar twnl commented on May 26, 2024 1

I'm currently updating YH to Debian 11 and Pixelfed to 0.11.4 and take the waiting time to write this.

I also have this same problem, even after reading the entire issue and even though @sthaydn already gives a quite good explanation, I'm not 100% sure what I need to do to solve the problem.

php_admin_value[upload_max_filesize] = 25M adding to the pixelfed.conf inside /etc/php/7.3/pool.d/ did the trick.

  • ssh into my YunoHost command line
  • type: sudo nano /etc/php/LATEST-PHP-VERSION/pool.d/pixelfed.conf
  • Search for the line: php_admin_value[upload_max_filesize] and add the desired value behind it e.g. php_admin_value[upload_max_filesize] = 32M

Is that it, is that correct @lapineige ?

from pixelfed_ynh.

webmink avatar webmink commented on May 26, 2024 1

Helpful voices on the Fediverse pointed me here as I had the same issue with a clean install of PixelFed on Yunohost 11. Not being especially familiar with the software involved I was not able to work out what to do from this thread, but I did edit /etc/php/7.4/fpm/php.ini and change upload_max_filesize to 20M and it now works. I suspect I will not be the only marginally capable Yunohost user with this problem...

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024 1

We now changed the default upload limit to be 50MB for your information. Thanks @yalh76 !

You could try the testing branch and see if it fixes it 🙂

from pixelfed_ynh.

unersame342 avatar unersame342 commented on May 26, 2024 1

after that you need to restart redis-server postgresql nginx and php8.0 in yunohost and all should work

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

@yalh76 do you think a simple php.ini file in /var/www/pixelfed would do the job ?

If that the case, I'll do the PR :)

from pixelfed_ynh.

yalh76 avatar yalh76 commented on May 26, 2024

I think it would be easier to reintegrate https://github.com/YunoHost/example_ynh/blob/master/conf/php-fpm.conf that i removed during php 7.1 to 7.3 upgrade

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

Do we need that whole file ?

from pixelfed_ynh.

yalh76 avatar yalh76 commented on May 26, 2024

yes, to have a customized php-fpm.

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

So we can't include only a few lines of it, we need the whole file ? (and to maintain it aligned with the standard one, including the case when we change php version)
Then wouldn't it be simpler to have a php.ini file with the only 2 or 3 relevant lines ?
Note: I don't know the implications in both cases, I'm not really into php.

from pixelfed_ynh.

yalh76 avatar yalh76 commented on May 26, 2024

So we can't include only a few lines of it, we need the whole file ? (and to maintain it aligned with the standard one, including the case when we change php version)
Then wouldn't it be simpler to have a php.ini file with the only 2 or 3 relevant lines ?
Note: I don't know the implications in both cases, I'm not really into php.

I don't know how to use a php.ini...

And usually there are few changes php-fpm.conf between php version

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

From my understanding, adding a php.ini file one /var/www/pixelfed containing just the one or few lines needed does the job. It did in my case at least.

from pixelfed_ynh.

yalh76 avatar yalh76 commented on May 26, 2024

well in that case, feel free to do a PR for that ;)

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

I think maybe someone from the @YunoHost-Apps/apps-group might know these things better than me: what would be your advise in that case ? php-fpm conf or "just" the php.ini file ?

from pixelfed_ynh.

yalh76 avatar yalh76 commented on May 26, 2024

client_max_body_size is now 50Mo but can be increase

client_max_body_size 50M;

from pixelfed_ynh.

mikail97 avatar mikail97 commented on May 26, 2024

The same thing is happening to me, where I find the file in which I can modify the size?
Thanks in advance! @yalh76

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

/etc/nginx/conf.d/pixelfed_domain.tld.conf/pixelfed.conf, or something like this.

That's the Nginx part, you might need to adjust php file too, probably located in /etc/php7.4/fpm/pool.d/pixelfed.ini or similar (sorry, I don't have the ability to check if that's very accurate right now…).
There you can add those lines :

php_admin_value[upload_max_filesize] = 16M
php_admin_value[memory_limit] = 8M
php_admin_value[post_max_size] = 8M

(adjust the value to ones that fits your needs ;)

Then reload php service php-7.4-fpm reload, and you're done :)

from pixelfed_ynh.

mikail97 avatar mikail97 commented on May 26, 2024

/etc/nginx/conf.d/pixelfed_domain.tld.conf/pixelfed.conf, or something like this.

That's the Nginx part, you might need to adjust php file too, probably located in /etc/php7.4/fpm/pool.d/pixelfed.ini or similar (sorry, I don't have the ability to check if that's very accurate right now…).
There you can add those lines :

post_max_size = 8M
upload_max_filesize = 8M
max_file_uploads = 20

(adjust the value to ones that fits your needs ;)

Then reload php service php-7.4-fpm reload, and you're done :)

I found two "pixelfed.conf" files in my system, but no one is "pixelfed.ini"
/etc/nginx/conf.d/mydomain.xxx.d/pixelfed.conf
/etc/php/7.3/fpm/pool.d/pixelfed.conf

If I add the lines of code that you told me in one of these two files or in both, when restarting the service, it does not restart.

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

/etc/php/7.3/fpm/pool.d/pixelfed.conf

That's the one :) (I knew it wasn't .ini😅)

If I add the lines of code that you told me in one of these two files or in both, when restarting the service, it does not restart.

What's the error ?

from pixelfed_ynh.

mikail97 avatar mikail97 commented on May 26, 2024

If I add the lines of code that you told me in one of these two files or in both, when restarting the service, it does not restart.

What's the error ?

If I add the three code lines you told me, and I reload php, I get a 502 (Bad Gateway)
If I stop the service and I start it again (try to) I get this :

● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-07-04 15:06:02 EDT; 12s ago
     Docs: man:php-fpm7.3(8)
  Process: 10517 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf (code=exited, status=78)
  Process: 10518 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.3/fpm/pool.d/www.conf 73 (code=exited, status=0/SUCCESS)
 Main PID: 10517 (code=exited, status=78)

Jul 04 15:06:02 mydomain.xxx systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Jul 04 15:06:02 mydomain.xxx php-fpm7.3[10517]: [04-Jul-2021 15:06:02] ERROR: [/etc/php/7.3/fpm/pool.d/pixelfed.conf:21] unknown entry 'post_max_size'
Jul 04 15:06:02 mydomain.xxx php-fpm7.3[10517]: [04-Jul-2021 15:06:02] ERROR: Unable to include /etc/php/7.3/fpm/pool.d/pixelfed.conf from /etc/php/7.3/fpm/php-fpm.conf at line 21
Jul 04 15:06:02 mydomain.xxx php-fpm7.3[10517]: [04-Jul-2021 15:06:02] ERROR: failed to load configuration file '/etc/php/7.3/fpm/php-fpm.conf'
Jul 04 15:06:02 mydomain.xxx php-fpm7.3[10517]: [04-Jul-2021 15:06:02] ERROR: FPM initialization failed
Jul 04 15:06:02 mydomain.xxx systemd[1]: php7.3-fpm.service: Main process exited, code=exited, status=78/CONFIG
Jul 04 15:06:02 mydomain.xxx systemd[1]: php7.3-fpm.service: Failed with result 'exit-code'.
Jul 04 15:06:02 mydomain.xxx systemd[1]: Failed to start The PHP 7.3 FastCGI Process Manager.

when I check service php-7.3-fpm status

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

My bad, the syntax was wrong (I edited my previous post). Here is the correct one:

php_admin_value[upload_max_filesize] = 16M
php_admin_value[memory_limit] = 8M
php_admin_value[post_max_size] = 8M

from pixelfed_ynh.

mikail97 avatar mikail97 commented on May 26, 2024

My bad, the syntax was wrong (I edited my previous post). Here is the correct one:

php_admin_value[upload_max_filesize] = 16M
php_admin_value[memory_limit] = 8M
php_admin_value[post_max_size] = 8M

I just did it and it doesn't give me an error but it hasn't solved the main problem either, I still cannot upload photos of more than 2MB, I have to put those three lines in both files?

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

I have to put those three lines in both files?

No, that for php, the other file is for Nginx (the web server).

What's the client_max_body_size value in Nginx config file ?

from pixelfed_ynh.

mikail97 avatar mikail97 commented on May 26, 2024

What's the client_max_body_size value in Nginx config file ?

50M

Edit: I just tried to upload an image, and it won't let me upload anything larger than 500KB, previously it let me up to 2MB

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

Whenever I change the configuration from the web interface and give "save", I get this "Something went wrong
We cannot process your request at this time, please try again later. Go back to Pixelfed. "
Why?

I don't know…
If you do the same change in the .env file (don't forget to run the usual php artisan commands, to take the change into account), does it work ?

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

So we can't include only a few lines of it, we need the whole file ?

@yalh76 do you think that with the new tools Yunohost includes to setup a kind of "php performance profile" (memory limit, CPU usage…) we could change that upload size value without using a custom php.conf file ?

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

I don't remember 😅
Can you tell us once you tried ? 😄

type: sudo nano /etc/php/LATEST-PHP-VERSION/pool.d/pixelfed.conf

Php7.4 right now, for your information. If you have PHP 8.0 installed by another app, it's not the one you should configure for Pixelfed.
(it might be php7.4-fpm, I'm unsure how this folder is named)

from pixelfed_ynh.

isAAAc avatar isAAAc commented on May 26, 2024

@lapineige : (edit: i tried to reopen this issue, but don't see how .... :/ )

in https://github.com/YunoHost-Apps/pixelfed_ynh#change-max-upload-limit
The readme.md should better explain where and wich file to edit:

To change max upload limit (default : 50MB), edit the Pixelfed php-fpm.conf file and find the line Common values to change to increase file upload limit And adjust those values:

this is wrong and should be:

 To change max upload limit (default : 50MB), edit the Pixelfed pixelfed.conf file in the `/etc/php/<PHP_VERSION>/fpm/pool.d/pixelfed.conf` and add and adjust those values:

from pixelfed_ynh.

isAAAc avatar isAAAc commented on May 26, 2024

the upgrade removes the change i made :/ perhaps we could have an include for local changes ?

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

I don't get what should have been untouched ?

from pixelfed_ynh.

tituspijean avatar tituspijean commented on May 26, 2024

All of this should be handled with a YunoHost config panel, so that the setting is save across upgrades.

from pixelfed_ynh.

lapineige avatar lapineige commented on May 26, 2024

Yes we have to configure a config panel for that 😅

from pixelfed_ynh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.