There could be a problem with the amount of memory. I'm not able to reproduce this issue on my end with my test site. I did not have thousands of pages but I did have hundreds. If you go into your Templates folder you should find an xml file there. Please post back with this file in a zip archive so I can try to recreate your site. If I'm not able to get any further on it I will open a ticket for you on this issue.