Space export page loads infinitely or very slow
Symptoms
When Export Content to Word, PDF, HTML and XML, specifically exporting Confluence Pages and Spaces to XML, the page loads infinitely or very slow. Therefore it isn't possible to run the export at all.
Cause
Confluence ancestor table is somehow broken.
Diagnosis
Check if CONFANCESTORS table is corrupted by running this SQL query:
SELECT A.ANCESTORID, A.DESCENDENTID, COUNT(A.DESCENDENTID)
FROM CONFANCESTORS A, CONTENT B
WHERE B.CONTENTID = A.DESCENDENTID
GROUP BY A.ANCESTORID, A.DESCENDENTID
ORDER BY 3 DESC;
All returned rows should have value '1' for the column 'count'. If there is a value other than '1' (e.g. '2', '3', etc.), the CONFANCESTORS table is broken.
Resolution
Rebuild your Confluence ancestor table