Got an error while using Garage Band software in Mac

Hi,
I was recording a piece in my Mac using GarageBand when randomly I got this error message.

Core Audio:
Disk is too slow (Write)
(-10002)
It was working before and I didn’t think my hard disk was slow. I didn’t know what to do next.
Any advice on how to fix this problem? It appears intermittently.
Thanks.
