LycheeOrg / Lychee-Docker

Docker image for Lychee
https://lycheeorg.github.io/
167 stars 55 forks source link

php size limits are stuck at 100M #109

Closed hess8 closed 2 years ago

hess8 commented 2 years ago

I've done all I can think of to get the max file and post sizes to change (hrs...).

Lychee is stuck at 100M limits DB Version: 4.3.4 System: Linux PHP Version: 7.4 Max uploaded file size: 100M Max post size: 100M

I've changed the sizes to 1024M in php.ini and another php_uploads.ini to conf/

As seen in a grep (same for max_upload_filesize), the .ini files have the right values:

..but the container is stuck at an 8M limit , even though Inspect says it's binding to these php.ini files I'm working with. So somehow Lychee is ignoring my settings (higher) and the container settings (way too low)

/var/lib/docker/overlay2/08b24cfb4a971b48bad1500a60f4fee808a0dfd523060bffdcf55e0013188025/merged/etc/php/7.4/cli/php.ini:post_max_size = 8M
/var/lib/docker/overlay2/08b24cfb4a971b48bad1500a60f4fee808a0dfd523060bffdcf55e0013188025/merged/etc/php/7.4/fpm/php.ini:post_max_size = 8M
/var/lib/docker/overlay2/08b24cfb4a971b48bad1500a60f4fee808a0dfd523060bffdcf55e0013188025/diff/etc/php/7.4/cli/php.ini:post_max_size = 8M
/var/lib/docker/overlay2/2ff3eadeb911d03af089f729da17f0e98b3fa1cb44b0d31fd3e25e26a93f275d/diff/etc/php/7.4/cli/php.ini:post_max_size = 8M
/var/lib/docker/overlay2/2ff3eadeb911d03af089f729da17f0e98b3fa1cb44b0d31fd3e25e26a93f275d/diff/etc/php/7.4/fpm/php.ini:post_max_size = 8M

How can I get my settings into Lychee? Is 100M somehow fixed in the code?

FYI here is my minimal docker-compose file:

mariadb:
   image: ghcr.io/linuxserver/mariadb:latest
   container_name: lychee_mariadb
   restart: always
   volumes:
     - /path/to/mariadb/data:/config
  lychee:
    image: lycheeorg/lychee
    container_name: lychee
    restart: always
    volumes:
      - ./lychee/conf:/conf
      - ./lychee/uploads:/uploads
      - ./lychee/sym:/sym
      - ./uploads.ini:/etc/php/7.4/cli/conf.d/uploads.ini
    environment:
      - TZ=America/Denver
    ports:
      - 8080:80
d7415 commented 2 years ago

This is all handled in the nginx configuration https://github.com/LycheeOrg/Lychee-Docker#advanced-configuration

hess8 commented 2 years ago

Thanks for your help.

OK, I did put nginx.conf with client_max_body_size increased.

The error is "PHP post_max_size limit is too small". Also, I don't have nginx installed on this machine, so I don't think nginx is limiting the size, unless somehow docker uses nginx code I don't know about.

On Fri, Oct 29, 2021 at 12:54 PM Martin Stone @.***> wrote:

This is all handled in the nginx configuration https://github.com/LycheeOrg/Lychee-Docker#advanced-configuration

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LycheeOrg/Lychee-Docker/issues/109#issuecomment-954974860, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW7WFGL2JMW3HGL4OK7CTUJL3YBANCNFSM5G742UVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

hess8 commented 2 years ago

Is there a way to get detailed logs of where lychee/docker pulls the value of post_max_size? docker-compose logs don't have much detail.

On Sat, Oct 30, 2021 at 9:04 AM Bret Hess @.***> wrote:

Thanks for your help.

OK, I did put nginx.conf with client_max_body_size increased.

The error is "PHP post_max_size limit is too small". Also, I don't have nginx installed on this machine, so I don't think nginx is limiting the size, unless somehow docker uses nginx code I don't know about.

On Fri, Oct 29, 2021 at 12:54 PM Martin Stone @.***> wrote:

This is all handled in the nginx configuration https://github.com/LycheeOrg/Lychee-Docker#advanced-configuration

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LycheeOrg/Lychee-Docker/issues/109#issuecomment-954974860, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW7WFGL2JMW3HGL4OK7CTUJL3YBANCNFSM5G742UVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

d7415 commented 2 years ago

The PHP limits are set from the nginx config. Yes, there is nginx in the container.

hess8 commented 2 years ago

Thanks for your responses. I never could get a docker install to get the php settings recognized. I finally did get an install working with the limits I wanted with git clone, nginx manual config and php-fpm. The most organized description of what to do was https://www.tecmint.com/lychee-photo-management-system-for-linux/

d7415 commented 2 years ago

I mean, it was all in the link I posted above, but ok.