Can't save any document previews

When things don't work as they should.
Post Reply
Posts: 1
Joined: Fri Feb 14, 2020 3:27 pm

Can't save any document previews

Post by markor »


Right now im running in a problem with saving document previews permanently.
Im running Mayan in Docker Desktop for Windows and it works so far.
Database and volume is running on aws and if I upload a document, it also get saved
in my s3 bucket. However previews still get saved in the container, so if i restart Docker Desktop
the previews get lost and a red "X" shows instead of the preview, which makes sense
since the storage in the container isn´t permanent.

I tried to move the "DOCUMENTS_CACHE_STORAGE_BACKEND" also to s3 and it is saving files there then
but it is still showing me a red X-Icon instead of the preview.

Do you have any Idea how to solve that?

User avatar
Posts: 212
Joined: Mon Oct 14, 2019 1:18 pm
Location: United Kingdom

Re: Can't save any document previews

Post by rssfed23 »

This is happening because, as you seem to identify, the cache is being stored locally.

I don't know how supported it is to have the documents cache in s3. It's also likely because of the way that object storage works that mayan thinks the cache image is written before it's actually ready to be read back by the frontend, and the frontend tries too soon.
There are some tweaks to cache handling coming in v4 and 4.1 I believe, which may help in this area.

I do wonder if S3 is the best place for such a cache. The latencies involved may also provide a poor user experience. A simple way you can work around the issue is to put the documents_cache folder inside a mounted volume, so that it isn't destroyed when you restart docker desktop (ensure that folder is also passed through onto the host OS).
Please bear with us during the current global situation. The team all have families and local communities to look after as well as the community here. Responses may be delayed during this time, but rest assured we will get to your query eventually.

Post Reply