Pupil dilation has consistently been investigated and confirmed as a reliable measure of cognitive load. In this study, we aim to explore the possibility of predicting cognitive failures in Virtual Reality by monitoring variations in pupil dilation during cognitive processing. To this end, we collected eye-tracking data from an individual performing a mental arithmetic task over two months, totaling 700 minutes. We achieved promising prediction results by training a neural network on the collected data, particularly considering the dataset's imbalanced nature. The ability to predict impending cognitive failures generally holds significant implications across various domains, including education, delegating decision-making tasks to autonomous systems, or self-adaptive virtual environments and user interfaces.