It is narrated from Abdullah bin Abbas (may Allah be pleased with them both) that he said: The sun was eclipsed, and the Messenger of Allah (ﷺ) performed prayer, and the people were with him. He stood for a long time, equal to the recitation of Surah Al-Baqarah, then he made a long bowing, then he stood up and the standing was also long but less than the first standing, then he made a long bowing but less than the first bowing, then he prostrated. Then he stood up and the standing was long but less than the previous standing, then he made a long bowing but less than the previous bowing, then he prostrated. Then finally he finished the prayer with salam, and by that time the sun had become bright again. The Prophet (ﷺ) said: "Indeed, the sun and the moon are two signs among the signs of Allah. They do not eclipse because of anyone's death or life. So when you see them (in eclipse), remember Allah." The companions said: O Messenger of Allah (ﷺ)! We saw that (during the prayer) you moved forward and then backward. The Prophet (ﷺ) said: "I saw Paradise, or it was shown to me, and I wanted to pluck a bunch of its fruit. If I had plucked it, you would have eaten from it as long as the world remains. And I saw Hell, or it was shown to me, and I have never seen a more horrifying sight than that. I saw that most of its inhabitants are women." The companions asked: What is the reason for that, O Messenger of Allah (ﷺ)? He said: "Because of their disbelief (ingratitude)." It was asked: Do they disbelieve in Allah? He said: "Because of their ingratitude towards their husbands and ungratefulness for favors. You may do good to a woman all your life, but if she sees something (from you) that she dislikes, she will say, 'I have never seen any good from you.'"
Hadith Referenceمسند الإمام الشافعي / كتاب الكسوف / 549
Hadith Takhrijاسناده ضعيف لضعف شيخ الشافعي والحسن البصري مدلس وعنعن اخرجه البيهقي في المعرفة السنن والآثار (1992)۔