dansup on Nostr: I identified the cause behind the periodic pixelfed.social downtime, and it had to do ...
I identified the cause behind the periodic pixelfed.social downtime, and it had to do with an inefficient database query that calculates the total # of local posts.
I refactored the logic to cache the value and update it periodically (twice daily) as a scheduled command.
So we're now returning that cached value instead of doing an expensive db query for this, you'll likely not notice this unless you have millions of statuses in your db
https://github.com/pixelfed/pixelfed/pull/5184#pixelfed #pixeldev
Published at
2024-06-19 11:12:27Event JSON
{
"id": "f8bd4a81b13654f6f712cc2d743fb72a55a832df93a604a16c12267e1ff78c47",
"pubkey": "fce95231cd584e791f1f5d977ceac1ef6edb3d3a7a29ada5a657979836cbcb1f",
"created_at": 1718788347,
"kind": 1,
"tags": [
[
"t",
"pixelfed"
],
[
"t",
"pixeldev"
],
[
"proxy",
"https://mastodon.social/users/dansup/statuses/112642513144689760",
"activitypub"
]
],
"content": "I identified the cause behind the periodic pixelfed.social downtime, and it had to do with an inefficient database query that calculates the total # of local posts. \n\nI refactored the logic to cache the value and update it periodically (twice daily) as a scheduled command.\n\nSo we're now returning that cached value instead of doing an expensive db query for this, you'll likely not notice this unless you have millions of statuses in your db\n\nhttps://github.com/pixelfed/pixelfed/pull/5184\n\n#pixelfed #pixeldev",
"sig": "138a73d2fb7e0d416bd8d127ac127c31ce664d25d1cc5c0c24789200ad5d244d92de84525aa7892f193fb89aa5f9b6b97e324e7d28c3607b34e35c98c10f4e66"
}