Lychee: Lychee:Sync returns "Killed" after a few minutes of uploading.

Detailed description of the problem [REQUIRED]

I have uploaded some photos (less than 100) into an album on my NAS, which is where my Lychee instance lives in a docker container. The goal is to eventually set up a cronjob so I can slowly back up all my photos. Currently, some photos are divided into /year/month/day/picture.jpg while two others (for testing) are just placed into a single directory.

These are all located in the container path of /pictures/import/, which is also /srv/disk-path/Lychee/imports. In the latter example, other directories alongside import include: big, medium, small, raw, and thumb.

When I docker exec -ti /bin/bash into my lychee container and run php /app/lychee/artisan lychee:sync /pictures/import, the files begin importing, but something begins to hang it up and then the terminal just returns Killed.

Here are the last few entries in php /app/lychee/artisan lychee: logs

2021-09-27 14:37:58 -- notice -- App\Image\ImagickHandler::scale -- 113 -- Saving thumb to /app/lychee/public/uploads/small/ea715fec1e2fdd7bc9409b5379dccc34@2x.JPG 2021-09-27 14:38:02 -- notice -- App\Actions\Photo\Extensions\ImageEditing::createThumb -- 165 -- Photo URL is 2a31d9548778eb6b9c7db1bcc3e75845.JPG 2021-09-27 14:38:05 -- notice -- App\Image\ImagickHandler::crop -- 161 -- Saving thumb to /app/lychee/public/uploads/thumb/2a31d9548778eb6b9c7db1bcc3e75845.jpeg

It just stops without explanation. See Diagnostics below.

Things I’ve accounted for:

  • File size, thought I’ve looked through and nothing is above 16mb. That being said, I adjusted my .ini file according to the documentation to the following: max_execution_time = 200 post_max_size = 100M upload_max_size = 100M upload_max_filesize = 100M memory_limit = 256M

  • Every time it fails, the last entry of the logs has to do with ImagickHandler. But I’m not sure how to dig deeper into why that handler would cause the import to be killed. It is also failing on the same thumbnail, but I’m not sure how to download and actually see the thumbnail for issues.

  • My file structure is based on either Apple Photos (drag and drop from Photos into a Finder window and directory), or from the iOS PhotoSync app, uploading via SMB into the import directory.

  • I’ve also tried just importing a single directory within the import directory with this command: php /app/lychee/artisan lychee:sync /pictures/import/2021

Steps to reproduce the issue

Steps to reproduce the behavior:

  1. Place images in import directory
  2. Access command line within the Lychee Docker container
  3. Run php /app/lychee/artisan lychee:sync /pictures/import/
  4. Watch the terminal attempt to import or skip duplicates and then fail at a certain point.

Screenshots If applicable, add screenshots to help explain your problem.

Output of the diagnostics [REQUIRED]

(Settings => Diagnostics or https://example.com/Diagnostics or php artisan lychee:diagnostics)

`Diagnostics

Warning: Dropbox import not working. dropbox_key is empty. Warning: You may experience problems when uploading a large number of photos. Take a look at the FAQ for details. Info: Latest version of PHP is 8

System Information

Lychee Version (release): 4.3.4 DB Version: 4.3.4

composer install: --no-dev APP_ENV: production APP_DEBUG: false

System: Linux PHP Version: 7.4 Max uploaded file size: 100M Max post size: 100M MySQL Version: 10.5.12-MariaDB-log

Imagick: 1 Imagick Active: 1 Imagick Version: 1803 GD Version: bundled (2.1.0 compatible)

Config Information

version: 040304 check_for_updates: 0 sorting_Photos_col: taken_at sorting_Photos_order: ASC sorting_Albums_col: max_taken_at sorting_Albums_order: ASC imagick: 1 skip_duplicates: 1 small_max_width: 0 small_max_height: 360 medium_max_width: 1920 medium_max_height: 1080 lang: en layout: 0 image_overlay_type: desc default_license: reserved compression_quality: 90 full_photo: 1 delete_imported: 1 Mod_Frame: 1 Mod_Frame_refresh: 30 thumb_2x: 1 small_2x: 1 medium_2x: 1 landing_page_enable: 0 landing_owner: redacted landing_title: redacted landing_subtitle: redacted landing_facebook:
landing_flickr:
landing_twitter:
landing_instagram:
landing_youtube:
landing_background:
site_title: Lychee v4 site_copyright_enable: 1 site_copyright_begin: 2019 site_copyright_end: 2019 additional_footer_text:
display_social_in_gallery: 0 public_search: 0 SL_enable: 0 SL_for_admin: 0 public_recent: 0 recent_age: 1 public_starred: 0 downloadable: 0 photos_wraparound: 1 map_display: 1 zip64: 1 map_display_public: 1 map_provider: Wikimedia force_32bit_ids: 0 map_include_subalbums: 0 update_check_every_days: 3 has_exiftool: 1 share_button_visible: 0 import_via_symlink: 0 has_ffmpeg: 1 location_decoding: 1 location_decoding_timeout: 30 location_show: 1 location_show_public: 0 rss_enable: 0 rss_recent_days: 7 rss_max_items: 100 prefer_available_xmp_metadata: 0 editor_enabled: 1 lossless_optimization: 0 swipe_tolerance_x: 150 swipe_tolerance_y: 250 local_takestamp_video_formats: .avi|.mov log_max_num_line: 1000 unlock_password_photos_with_url_param: 0 nsfw_visible: 1 nsfw_blur: 0 nsfw_warning: 0 nsfw_warning_admin: 0 map_display_direction: 1 album_subtitle_type: oldstyle upload_processing_limit: 4 public_photos_hidden: 1`

Browser and system

Odroid HC-4 OMV, Docker Linux, armv8, 4gb ram

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

I tried to upload your image to Lychee using the web GUI. It worked for me out-of-the-box when using Imagick, but it failed when I had Imagick disabled; it was running out of memory then. My memory_limit was set to 128M; increasing it to 512M fixed it (I have not tried 256M).

Based on your diagnostics output, you are using Imagick so should not be affected by this though. Although, depending on the amount of memory on your server, Imagick may be exhausting system resources and be getting killed by the kernel. You may want to check you system log for any such output after a failed upload/import attempt (that may require admin-level access). Another possibility is that your Imagick installation has a low maximum image width limit. Typically the limit is set to 16KP so your image should not be affected, but do check the config file policy.xml on your server; in my case it’s in /etc/ImageMagick-7/ but I imagine that may vary depending on the version of Imagick.

I updated the php-local.ini file in my config directory. I don’t see another ini file in that or my db directory, unless I’m missing something or was supposed to add a file?

I suspect the other message will solve this, but if you’re using the Docker image it won’t be using the NAS’s php installation/configuration. You need to configure within the container.