How can I tell if NC is using imaginary?

Nextcloud version (eg, 20.0.5): 23.0.4

Using the official NC docker image.

I have added this to my config.php:

  'enabledPreviewProviders' => [
    'OC\\Preview\\TXT',
    'OC\\Preview\\MarkDown',
    'OC\\Preview\\PDF',
    'OC\\Preview\\MSOfficeDoc',
    'OC\\Preview\\JPEG',
    'OC\\Preview\\PNG',
    'OC\\Preview\\GIF',
    'OC\\Preview\\BMP',
    'OC\\Preview\\XBitmap',
    'OC\\Preview\\MP3',
    'OC\\Preview\\HEIC',
    'OC\\Preview\\Movie',
    'OC\\Preview\\MKV',
    'OC\\Preview\\MP4',
    'OC\\Preview\\AVI',
    'OC\\Preview\\MP3',
    'OC\\Preview\\OpenDocument',
    'OC\\Preview\\Krita',
    'OC\\Preview\\Imaginary',
  ],
  'preview_imaginary_url' => 'http://imaginary:9000',

and I am running an imaginary service within the same docker network as NC.

Thumbnail generation seesm very fast, however, I’m not positive that it’s just that way as is, or if it’s due to using the imaginary service; is there some way to see for sure whether NC is in fact making use of imaginary now that I’ve added it to the config?

I have tried looking in NC logs, but see nothing that lets me know for sure?

Thanks!

Imaginary is only available starting with Nextcloud 24

@szaimen oh wow, then I’m very impressed at how fast the thumbs are loading already! lol

Will there be a way to see in logs if imaginary is being used, in version 24?

p.s.

Others might find it useful to have the version availability mentioned on the page I found the info on: Server tuning — Nextcloud latest Administration Manual latest documentation

Feel free to add the version here: Sign in to GitHub · GitHub
Apart from that, the doc link that you sent refers to Nextcloud 24. What you should have used is https://docs.nextcloud.com/server/stable/admin_manual/installation/server_tuning.html or https://docs.nextcloud.com/server/23/admin_manual/installation/server_tuning.html

ok, I didn’t realize that I was using the wrong help docs.

I’m using the :latest tag to pull the image, and in the URL of the help docs link I posted also contains “latest” in it. I assumed it was the proper one to use.

Regarding my original question; will we be able to verify via the logs when imaginary is being used to fetch the images?

Just an added note: I unselected the “Solution” since it didn’t really answer the question I directly asked: “how to tell if NC is using imaginary”.

Granted I’m using the wrong version, but I did still ask a couple more times if v24 will do so, and still have not received an answer to it.

I would like to know this for when I do end up upgrading to v24, and I also feel it would be a useful answer to others either now or somewhere down the road…

1 Like

Same here. Would like to know, if and how imaginary is working together with nc.

I’m on Nextcloud 24.0.1 with tons of photos. I’m using preview-generator to pre generate previews. Otherwise it won’t be handy to use the cloud.

I’ve created another docker container with imaginary beside the nexcloud container and I’ve edited the config.php as described in the manual.

How can i see that imaginary is working as expected?

And which use case will imaginary speed up?
Will it speed up the preview generation with the preview-generator app?
Or will it speed up the preview provision, eg if a folder with a large amount of images will be browsed?

Some detailed answers would be fine here.

Thanks in advance.

For me, i’ve deactivated imaginary again. It neither seemed to speed up the preview generation with preview generator nor seemed to speed up the browsing experience.

Instead of getting the expected advantages, i got a lot of timeout issues and other issues in the log, with the effect, that i’ve seen some image loading errors in the browser. With deactivating imaginary, the errors have gone away.

Maybe i’ll give imaginary a retry later though, if it will be clearer what imaginary is doing in the background.

It would be very useful to have some information around this, including some debugging steps. As far as I can tell I’ve configured everything correctly as per the documentation. I’m running 24.0.1 I’ve checked connectivity to the imaginary and it works. However I see no evidence that Nextcloud is using imaginary, the container logs show no connection requests (aside from my manual connections) and the container CPU usage remains at zero when previews are being generated.

This is a good question. I’m sure my installation of imaginary is listening on port 8088 (default) but my log says: "GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to localhost port 8088 after 0 ms: Connection refused (see libcurl - Error Codes) for http://localhost:8088/pipeline?" Obviously, the permissions are not correct. My problem is I don’t really know what a ‘microserver’ is. I don’t know how to shut it down, restart it, or configure it. The installation instructions are designed for someone with more knowledge than me. Imaginary should be making things run faster but I suspect that at the moment it is slowing things down. Any help greatly appreciated.
PS - this is not a docker installation.

I just verified: you should get a log line like this in the imaginary container logs if it works correctly: 172.18.0.9 - - [22/Aug/2022 21:13:20] "POST /pipeline?operations=%5B%7B%22operation%22%3A%22autorotate%22%7D%2C%7B%22operation%22%3A%22fit%22%2C%22params%22%3A%7B%22width%22%3A2048%2C%22height%22%3A2048%2C%22stripmeta%22%3A%22true%22%2C%22type%22%3A%22jpeg%22%2C%22norotation%22%3A%22true%22%7D%7D%5D HTTP/1.1" 200 64033 0.1217

However afaik is a new release of imaginary for this required which is still unreleased since the image was not updated since almost two years.

I’m presuming I can’t use imaginary unless I’m using docker (see my original question). However, it would be really good if someone with expertise could confirm that.

Please excuse my ignorance about this problem. By using ps aux, imaginary appears to be listening on port 6608. When I use http://localhost:6608 or http://:6608, I get ‘connection refused’. I’ve tried looking through all logs but can’t find:
"POST /pipeline?operations=%5B%7B%22operation%22%3A%22autorotate%22%7D%2C%7B%22operation%22%3A%22fit%22%2C%22params%22%3A%7B%22width%22%3A2048%2C%22height%22%3A2048%2C%22stripmeta%22%3A%22true%22%2C%22type%22%3A%22jpeg%22%2C%22norotation%22%3A%22true%22%7D%7D%5D HTTP/1.1" 200 64033 0.1217"
or anything like.
It’s quite annoying because previous posts and the documentation says that imaginary makes previews a lot faster.

I think that a compatible imaginary version is not even officiall released yet. That is why we are building our own imaginary container from the sources for AIO.

Many thanks for your reply. I’ll wait and see what happens. Keep up the good work!!!

image002.jpg