Since I do seem to be able to work around this I guess this may just be feedback or an FYI just in case there is an actionable cause somewhere.
While working on a table of contents page that links to anchors on various posts I began to occasionally get 502 errors, Failed to post. Please try again. (502)
Trying again usually worked so on I continued.
However as the TOC got longer saving/publishing the page produced the 502 more and more frequently. I’m pretty much done now with around 235 links on that page and it’s pretty much hit a brick wall in terms of clicking Publish and getting that 502 error essentially 100% of the time.
What I have noticed however is that if I open the TOC i n a different tab, the changes are or have been written successfully; it’s just the reloading of the draft page in the original tab that is stymied. So I typically just close out the stuck tab. When I go back to edit the TOC later, it reports there is already a draft open (presumably from the shut-down tab) so I just choose delete the other draft and carry on.
I am guessing that the number of links is the proximate cause of the error, but I don’t really know, it could be a coincidence.