I’ve got a large database (9.2 million posts) with a bunch of mega-topics (some > 150K posts!). When I try to do a restore to another server, I get something like this when it’s doing the remap to a new host name.
Restoring uploads, this may take a while...
Optimizing site icons...
Posts will be rebaked by a background job in sidekiq. You will see missing images until that has completed.
You can expedite the process by manually running "rake posts:rebake_uncooked_posts"
EXCEPTION: ERROR: deadlock detected
DETAIL: Process 960 waits for ShareLock on transaction 4765; blocked by process 2184.
Process 2184 waits for ShareLock on transaction 4915; blocked by process 960. HINT: See server log for query details.
CONTEXT: while updating tuple (566294,13) in relation "posts"
Is there something that I can do to resolve this deadlock?
This was on an 8GB standard droplet.
When trying to do a rebake I have had a similar issue with this site on a reasonably fast database server with 16GB of ram and a separate web server with 16GB of ram. Both were also serving some other fairly small and low-volume sites.
Does it seem likely that it’s the megatopics? Is there a solution other than splitting them into smaller ones?