Do you also get messages like:
- Part of the project was not played
- This project has too many real instrument tracks to be played in real-time.
- To optimize performance, see the 'Optimizing GarageBand performance' page in GB Help.
Then you may simple have too many real instruments tracks and effects, and I'd silence some tracks while editing and quit any other application you do not need, to free more RAM.
But if that is not the case, test, if you have the same problem with other GarageBand projects, or when working from a different user account. If it is a system wide problem, I'd reinstall GarageBand.
I get that message and the others mentioned by Léonie sporadically, and my projects are all quite small in terms of tracks. I have no clue what causes it. Locking all tracks I'm not in the process of editing seems to help, as does disabling CPU-intensive fx like Ambience until I'm ready to mix down. If there's too much hitting the CPU then data can start swapping out to the disk.
Look too at Activity Monitor and see if there are processes like security scans using your disk. When I first got Clam AV it would launch a scan and GB would go loopy. I figured out how to schedule the scans and stop them if I'm working on something I need the disk and CPU for.