Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

Large local import #177

Closed
roblandry opened this issue Jan 29, 2019 · 5 comments
Closed

Large local import #177

roblandry opened this issue Jan 29, 2019 · 5 comments
Labels
enhancement New feature or request Low Priority Low priority issues
Milestone

Comments

@roblandry
Copy link

roblandry commented Jan 29, 2019

Ive been trying to import tons of photos for days. I came to the conclusion that it is related to the max execution time of php. As a workaround, for large intitial imports, i would recommend adding a way to give unlimited execution time with a LARGE disclaimer. I edited /php/Modules/Import.php and added this after:

https://github.com/LycheeOrg/Lychee/blob/760ec6008a6f85cf666245a8bdcb3d39ba96c394/php/Modules/Import.php#L3

set_time_limit(0);

This allows the script to run until finished or until max memory reached. As i said, it is a bad thing to have this, however, i was only importing about 50 photos or so at a time, and i have thousands.

Might be worth adding a unlimited execution time variable, and testing if true to enable the unlimited time limit.

@ildyria
Copy link
Member

ildyria commented Jan 29, 2019

If you are using Import yes.

However if you are using Upload, you do not have this limitation (I uploaded more than 100 files at once) as for every file you will be launching the script..

Might be worth adding a unlimited execution time variable, and testing if true to enable the unlimited time limit.

This can easily be done. I like the idea of it to be a setting (obviously disabled by default).

Can you make a PR with this?
Also you do not even need to care about the user interface part as users now have full access to Lychee settings via the "More" button and "Save my modifications, I accept the Risk!" ⚠️ 😃

Disclaimer should be placed in the wiki though.

@ildyria ildyria added enhancement New feature or request Low Priority Low priority issues labels Jan 29, 2019
@roblandry
Copy link
Author

Yes, i will work on a PR in the near future, and submit when done. 😃 👍

@ildyria
Copy link
Member

ildyria commented Jan 29, 2019

Have a look at : https://github.com/LycheeOrg/Lychee/blob/master/php/database/update_030109.php to see how to add a setting in the Database (you will obviously need to create a new update_0302XX.php file ;) )

And if you have questions, feel free to drop by here: https://gitter.im/LycheeOrg/Lobby :)

roblandry added a commit to roblandry/Lychee that referenced this issue Jan 30, 2019
roblandry added a commit to roblandry/Lychee that referenced this issue Jan 30, 2019
ildyria added a commit that referenced this issue Feb 2, 2019
* Setting for image overlay type
* Create update file to insert `image_overlay_type` field in settings.
* Write the data display type to the settings table when submitted by the user.
* Include 24-hour timestamp in `photo.json`
* Add setting for php_script_limit. Fixes #177
* Update English locale with new Setting button
* Validate image overlay type default from Settings
* Write image_overlay_type keys to lychee_settings table
@ildyria ildyria added this to the v3.2.11 milestone Feb 3, 2019
@d7415
Copy link
Contributor

d7415 commented Feb 3, 2019

We should probably document this in the wiki (if we haven't already)

@d7415
Copy link
Contributor

d7415 commented Feb 5, 2019

We should probably document this in the wiki (if we haven't already)

Added to FAQ.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Low Priority Low priority issues
Projects
None yet
Development

No branches or pull requests

3 participants