Aerilym / photoprism-helper

An unofficial companion tool created for use alongside PhotoPrism to enable API endpoints and automation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[HELP] - Helper Auto Index timing out

twinkie0101 opened this issue · comments

Describe the issue
I've got auto index set up in docker (via Unraid). Only option I planned on using. The task is scheduled and run but I get a timeout error every time.

[2022-12-11 17:21:20] info: Timezone set to America/New_York
[2022-12-11 17:21:20] info: Targeting PhotoPrism instance at http://192.XXX.XX.XX:2342/
[2022-12-11 17:21:20] info: Scheduling auto index task.
[2022-12-11 17:21:20] info: PhotoPrism Helper API listening on port 2343
[2022-12-12 08:00:00] info: Running auto index.
[2022-12-12 08:00:31] error: timeout of 30000ms exceeded
[2022-12-12 08:00:31] info: Unknown error

To Reproduce
Steps to reproduce the behavior:

Not sure how to reproduce. Included docker settings below. The one thing I was unsure of on the setup is how to handle the API. I generated an API for the container, but if there is something I need to do in PhotoPrism, not sure what that is. Acknowledging my API understanding is limited.

Expected behavior

Run auto index every day.

Screenshots

image
image

Additional context
None.

Hi, so just to clarify a few things:

  • You don't need to worry about the API key or the API stuff, as that's just used if you want to send API calls to the helper (not to PhotoPrism). The helper uses your given PhotoPrism username and password to make requests to PhotoPrism.
  • The timeout message can be misleading as it's just waiting to receive a success message from PhotoPrism, so if the task takes longer than the timeout time, the helper will "timeout" and let you know.

I would recommend extending the timeout to a larger number, making it 3600000 would have it wait for 1 hour for a response. This should be enough time. If PhotoPrism has a lot of files to index, it can take a long time and might still fail. If this fails, please get back to me. Another thing to check is to see if it is actually indexing when it starts. Keep an eye on your PhotoPrism logs when its supposed to start, for me they're located at http://192.168.1.113:2342/library/logs (change it to your PhotoPrism location)

Adding the index timeout variable

In the settings, if you don't already have an index timeout field:

  1. Click the add variable button at the bottom
    image

  2. Use the following settings:
    image

Thanks, it's working as expected. Appreciate your work here!