'A'isha reported that there was a solar eclipse during the lifetime of the Messenger of Allah (way peace be upon him) and he sent the announcer (to summon them) for congregational prayer. The people gathered together and he pronounced takbir and he observed four rak'ahs, in the form of two rak'ahs (i. e. he observed two qiyams and two ruku's in one rak'ah) and four prostrations.
أَنَّ الشَّمْسَ خَسَفَتْ عَلَى عَهْدِ رَسُولِ اللَّهِ ﷺ فَبَعَثَ مُنَادِيًا الصَّلاَةَ جَامِعَةً فَاجْتَمَعُوا وَتَقَدَّمَ فَكَبَّرَ وَصَلَّى أَرْبَعَ رَكَعَاتٍ فِي رَكْعَتَيْنِ وَأَرْبَعَ سَجَدَاتٍ