You might want to split that HTML into a smaller size. The recommended size for a single HTML file inside the epub is around 280Kb. But then HTML filesize should not be an issue with Kindlegen processing it. Did your epub pass the epubcheck and/or preflight validation?
BTW, you might want to provide a screenshot of the error and lines of the HTML where the error is happening so others might be able to decipher the problem.