a large part of the queue going unbounded is due to the retry queue and missing checks if the receiving servers are actually available. quick fix is disabling the retry queue which is currently making it not go unbounded on lemmy.world
storing the queue persistently is somewhat of a separate issue since that doesn't much affect whether or not it can be processed in time.
also a ton of the memory use was (and is) due to inefficient sql queries.