Commit graph

1711 commits

Author SHA1 Message Date
Oneric
86988e71f0 mix/database/resync_inlined_caches: also resync reactions
Relies on the fixups from preceding commits being applied.
2025-08-30 00:00:00 +00:00
Oneric
16d0250c24 mix/database: by default fix replies count after object prune
Even if --keep-threads is used, replies of
pinned posts might still be pruned as documented
for this option.
Thus keep-threads is no reason to skip reply counter recalculation.
2025-08-30 00:00:00 +00:00
Oneric
fcf4867ddf mix/database: add task to resync inlined array duplicates
Presumably those inlined copies were added to avoid the need for queries
each time the info is needed. However, they tend to desync from the actual
activities for not yet fully understood reasons; see:
https://akkoma.dev/AkkomaGang/akkoma/issues/956

As a workaround until the root cause is identified and fixed and/or
we no longer rely on the inliend copies add a mix task to regenerate
the inlined "cache" from the authorative activity data.

Does not yet deal with inlined emoji reactions
since its format is a pain to deal with.
2025-08-27 00:00:00 +00:00
Oneric
97e1eccf89 mix/database: add task to empty inlined replies lists
Those arrays are only used on first post receipt in side effect processing
and but an useless waste of space and misleading afterwards.
2025-08-27 00:00:00 +00:00
Oneric
e8b8941e40 docs: add missing image
Fixes omission in 1924ec08c0
2025-08-24 00:00:00 +00:00
Oneric
7c1a08913f Merge pull request 'Provide reference Grafana dashboard and improve docs related to monitoring+perf' (#966) from Oneric/akkoma:grafana_ref into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/966
2025-08-23 16:27:18 +00:00
Oneric
c62a476289 docs/cli/database/prune_objects: add note about --limit and --prune-pinned interaction 2025-08-23 00:00:00 +00:00
Oneric
4d008c6bfd docs: add general optimisation and performance advice
And recommend a default config for remote pruning.
Also rewrite misleading note about vacuuming.
2025-08-23 00:00:00 +00:00
Oneric
c3c5277e05 Allow both HTTP1 and HTTP2 for outgoing connections
No HTTP3/QUIC support yet.
Note, allowing both here means we don't actually profit from HTTP2 multiplexing
due to Finch(? or maybe a dependency of Finch?) limitations. But it means we can
now interact with HTTP2-only instances (if such exist) and still may get minor
gains from header compression etc

Adventurous admins can change the config to allow only HTTP2,
thus profiting from multiplexing (but breaking federation with
HTTP1-only instances which are in fact observed to exist).
2025-08-20 00:00:00 +00:00
nikclayton
2b388523c7 docs/client: add Pachli
It explicitly intends to keep v1 filters around.
2025-08-18 00:00:00 +00:00
nikclayton
54b561ee2c docs/clients: Tusky is dropping v1-filter support
The next Tusky release is going to remove support for the v1 filters API,
see: https://codeberg.org/tusky/Tusky/pulls/5215.

Since Akkoma doesn't support the v2 API this
could cause significant issues for Akkoma users.
2025-08-18 00:00:00 +00:00
Oneric
1924ec08c0 Provide reference Grafana dashboard
And improve monitoring documentation in particular
more detailed instructions for setting up Prometheus
metric scraping and the reference Grafana dashboard.
2025-08-17 00:00:00 +00:00
Oneric
06dac6e7b5 docs: drop exact version pins on python dependencies
These old package versions cause issues in modern Python environments.
2025-08-17 00:00:00 +00:00
Oneric
295e4a4da3 api/masto/instance: add short_description field
Added in Mastodon 2.9.2 (June 2019) this is plain-text-only and supposed
to be shorter compared to the older description field.
Some clients were reported to require this field to properly function.

Reported-by: https://akkoma.dev/paulyd
2025-05-15 20:41:55 +02:00
solidsanek
23ee94c0d8 docs: use highlight blocks where appropriate 2025-05-10 17:14:36 +02:00
solidsanek
303f0931de docs: fix spelling and grammar 2025-05-10 17:00:55 +02:00
solidsanek
8b05f8bd84 docs: consistenly capitalise Caddy
When not referring to the command
2025-05-10 15:15:54 +02:00
solidsanek
4766e4bfce docs: consistently cpaitlaise Apache 2025-05-10 15:14:23 +02:00
solidsanek
11e82ea508 docs: change FE names to be more consistent
Preferring the spelling used in their repository
2025-05-10 15:10:57 +02:00
Oneric
3c3134f87c docs: exactly match spelling of distro package names
And use the project’s preferred spelling when
not referring to specific distro package.

Spelling of RedHat packages was left as is
as I can’t access RedHat’s package repository.
2025-05-10 15:01:09 +02:00
solidsanek
d86ae26092 docs: consistently spell ejabberd using lowercase
This matches the project’s own spelling
2025-05-10 14:50:54 +02:00
solidsanek
873f57690a docs: consistenly spell nginx using lowercase
This matches the spelling used by the nginx project
(which differs from the spelling used by the NGINX corporation)
2025-05-10 14:49:38 +02:00
Oneric
516827c356 mix/database: add keep-followed option for object pruning
This allows to retain posts and boosts of remote actors with local
follows regardless of age.
With the "full" setting this can be taken further treating such
followed actors just like local users even keeping all posts they
liked or reacated to.
2025-05-09 23:02:25 +02:00
Oneric
8576ec42ec mix/database: retain pinned objects by default
Pinned objects and their threads will be refetched
on user refresh which by default happens after a day
once a user is encountered again in any form including a mention.

We observed pruning pinned objects usually results in heavy load for
hours after a database prune due to a clogged up remote fetch queue as
pinned posts and their threads of many (most?) users get refetched.

Thus do not prune pinned posts by default.
Keeping closer to earlier behaviour this will still prune threads of
pinned posts regardless of --keep-threads if nothing else prevenets it.
2025-05-09 23:00:14 +02:00
Jonathan de Jong
bb50e9050b rearrange shims 2025-04-26 16:17:31 +02:00
Jonathan de Jong
64e7f25252 add instruction to make asdf work when logging into it with sudo 2025-03-31 13:27:25 +02:00
a
ab9a4ce0d5 remove specific split packages, refer only to erlang-headless or erlang 2025-03-19 20:15:57 +00:00
a
699c051101 erlang-headless now exists 2025-03-19 03:15:07 +00:00
a
dcfae9bfbf erlang-os_mon as well 2025-03-12 20:27:27 +00:00
a
efb901bdb5 fix: docs: arch linux split erlang package 2025-03-12 20:15:34 +00:00
Floatingghost
93200a8073 use latest ASDF instructions 2025-03-02 13:36:14 +00:00
Floatingghost
184c62359f drop back to 1.14/OTP25 2025-03-02 13:04:10 +00:00
Floatingghost
b1c0b9e01a test lowest and highest supported versions on PR 2025-03-02 11:49:41 +00:00
Oneric
b5fa8c6d09 readme: drop mention of YunoHost package
It’s no longer listed in the catalogue and
the git repo wasn't updated in over a year
2025-02-14 22:10:25 +01:00
floatingghost
8de373fa24 Merge pull request 'Fix various attachment cleanup issues' (#789) from Oneric/akkoma:attachcleanup-overeager into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/789
2025-01-05 15:39:48 +00:00
Floatingghost
e5619c0895 Merge remote-tracking branch 'norm/improve-asdf-install' into develop 2025-01-05 15:38:25 +00:00
Oneric
e8bf4422ff Delay attachment deletion
Otherwise attachments have a high chance to disappear with akkoma-fe’s
“delete & redraft” feature when cleanup is enabled in the backend. Since
we don't know whether a deletion was intended to be part of a redraft
process or even if whether the redraft was abandoned we still have to
delete attachments eventually.
A thirty minute delay should provide sufficient time for redrafting.

Fixes: https://akkoma.dev/AkkomaGang/akkoma/issues/775
2025-01-03 20:49:11 +01:00
Norm
4c7ef1e027 Update supported OTP version to 27 in docs
The minor incompatibility should have been fixed with commit
bee10eab5e and PRs #839 and #841.
2024-11-09 18:24:53 -05:00
Norm
6ed5be61ff docs: Note that Elixir 1.17 has been tested as working 2024-10-26 18:51:45 -04:00
Norm
a2e397a79d Update asdf install docs in Debian install guide
Instead of trying to update the version of asdf being used, just point
users to the guide on their website.

Ideally we'd do this for Elixir and Erlang as well, but new versions of
those packages may sometimes have compatibility issues with Akkoma. For
now, update those to the latest OTP and Elixir versions known to be
comaptible with Akkoma.
2024-10-22 16:01:58 -04:00
Oneric
a3101a435b Fix swagger-ui
Ever since the browser frontend switcher was introduced in
de64c6c54a /akkoma counts as
an API prefix and thus gets skipped by frontend plugs
breaking the old swagger ui path of /akkoma/swagger-ui.

Do the simple thing and change the frontend path to
/pleroma/swaggerui which isn't an API path and can't collide
with frontend user paths given pleroma is areserved nickname.

Reported in
  https://meta.akkoma.dev/t/view-all-endpoints/269/7
  https://meta.akkoma.dev/t/swagger-ui-not-loading/728
2024-06-27 18:29:45 +02:00
Oneric
95ed4931f8 docs: note frontend tasks need to be run as akkoma user
Fixes: https://akkoma.dev/AkkomaGang/akkoma/issues/748
2024-06-27 18:29:45 +02:00
floatingghost
3ff0f46b9f Merge pull request 'Docs: Improve backup restore + fix warnings' (#554) from ilja/akkoma:docs_db_create_in_separate_commands into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/554
2024-06-25 21:33:42 +00:00
floatingghost
59bfdf2ca4 Merge pull request 'Add limit CLI flags to prune jobs' (#655) from Oneric/akkoma:prune-batch into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/655
2024-06-17 20:47:53 +00:00
Oneric
bf8f493ffd Remove proxy_remote vestiges
Ever since 364b6969eb
this setting wasn't used by the backend and a noop.
The stated usecase is better served by setting the base_url
to a local subdomain and using proxying in nginx/Caddy/...
2024-06-16 01:21:52 +02:00
Oneric
a3840e7d1f Raise minimum PostgreSQL version to 12
This lets us:
 - avoid issues with broken hash indices for PostgreSQL <10
 - drop runtime checks and legacy codepaths for <11 in db search
 - always enable custom query plans for performance optimisation

PostgreSQL 11 is already EOL since 2023-11-09, so
in theory everyone should already have moved on to 12 anyway.
2024-06-07 16:21:09 +02:00
Norm
e2860e5292 Update PGTune recommendations
From experience, setting DB type to "Online transaction processing
system" seems to give the most optimal configuration in terms of
performance.

I also increased the recomended max connections to 25-30 as that leaves
some room for maintenance tasks to run without running out of
connections.

Finally, I removed the example configs since they're probably out of
date and I think it's better to direct people to use PGTune instead.
2024-06-06 12:18:51 -04:00
Oneric
aeaebb566c dbprune: allow splitting array and single activity prunes
The former is typically just a few reports; it doesn't make sense to
rerun it over and over again in batched prunes or if a full prune OOMed.
2024-05-31 17:16:40 +02:00
Oneric
225f87ad62 Also allow limiting the initial prune_object
May sometimes be helpful to get more predictable runtime
than just with an age-based limit.

The subquery for the non-keep-threads path is required
since delte_all does not directly accept limit().

Again most of the diff is just adjusting indentation, best
hide whitespace-only changes with git diff -w or similar.
2024-05-31 17:16:40 +02:00
Oneric
e64f031167 Log number of deleted rows in prune_orphaned_activities
This gives feedback when to stop rerunning limited batches.

Most of the diff is just adjusting indentation; best reviewed
with whitespace-only changes hidden, e.g. `git diff -w`.
2024-05-31 17:16:40 +02:00