I’m self-hosting the docker containers and I noticed the pictrs directory is steadily growing because of the cached images. Does anyone know if it gets cleaned up automatically or are hosters running scripts to clean it up after a certain amount of time? The install guides make no mention of it from what I can find.

@jon@lemmy.tf
link
fedilink
English
01Y

I’m just letting mine do whatever it wants, got plenty of local storage. If/when I have storage issues I’ll add an s3 bucket, pretty easy to modify the entrypoint for pictrs to pass s3 connection info in the docker-compose deployment.

@fox@lemmy.fakecake.org
link
fedilink
English
11Y

S3 support is a good thing, thanks for mentioning it.

HTTP_404_NotFound
link
fedilink
English
21Y

Honestly, If I can get posts to stay synced up, that will be a good day for me…

Seriously, federation/sync issues, are not fun.

@j4k3@lemmy.world
link
fedilink
English
21Y

Name checks out

HTTP_404_NotFound
link
fedilink
English
11Y

Hah!

@a253040@midwest.social
link
fedilink
English
01Y

IIRC, I’ve read comments elsewhere that pictrs caches for 6 months, but I can’t independently verify. I hope this gets a broader answer because I’m still on the fence about getting an instance set up for myself and some small communities.

rs5th
link
fedilink
English
01Y

I believe the activity table in Postgres is retained for 6 months (although I’m purging mine daily) and the pict-rs cache is 168 hours (1 week).

@Quindius@lemmy.world
link
fedilink
English
11Y

How do you purge daily? Also, does that delete any post history or anything in a similar vein?

rs5th
link
fedilink
English
11Y

I’m running the following SQL, although I’m not actually sure it’s as necessary since 0.18.3. It doesn’t delete any post history or anything.

DELETE FROM activity WHERE published < NOW() - INTERVAL '1 day';
@a253040@midwest.social
link
fedilink
English
11Y

I knew I read something was kept for 6 months ;)

Glad to see that even here, the best way to get the right answer on the internet is to provide a wrong one.

nii236
link
fedilink
English
11Y

Related note, pictrs is super cool. Its like an OSS imgur backend, but no one really talks much about it or its potential.

poVoq
link
fedilink
English
1
edit-2
1Y

Remote images are not cached or proxied right now as far as I know. Edit: seems I was wrong and there is some image caching happening. For sure for the small image thumbnails, but also sometimes for other pictures, but it seems very inconsistent.

Your growning pictrs directory might be also due to the extremely verbose default logging that Pictrs (and the Lemmy backend too btw) uses.

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 126 users / day
  • 421 users / week
  • 1.16K users / month
  • 3.85K users / 6 months
  • 1 subscriber
  • 3.68K Posts
  • 74.2K Comments
  • Modlog