I have an unusual problem.
I have many pages around 500 or so. And there are subpages and all stuff.
I had been digging for 3 days now. Finally I have found that there is one thing in options table called "_transient_rewrite_rules" it is maxed out at 1 MB.
And whenever I try to add a new page it start acting weird and all pages are orphans without any parent page. If I remove that newly added page then the "_transient_rewrite_rules" is back again below 1 MB and everything works nice.
Please let me know if someone else has some solution to it.