When X-Cart cache generation fails, please follow these steps:
1) Close all your web-site's pages (if any is opened in your browser).
2) Remove "var/run" folder, "var/datacache" folder, and "var/.rebuildStarted" file in your X-Cart installation (using FTP, SSH or File Manager in your website Control Panel).
3) Open X-Cart admin page in your browser (for example,
http://demostore.x-cart.com/admin/admin.php?target=login).
The last step will initiate the cache regeneration process in your browser. Do not close your browser until the cache generation process is completed successfully.