> The recording only last between about 2 and 10 measures and then stops and startsAre you saying that the audio disappears and then reappears whilst the project is in record mode in Sonar? (the drop in and out is contained within one clip).
Some general advice:
Ensure you are running the latest drivers and firmware for your audio interface
Ensure you are running the latest drivers and firmware for any USB MIDI devices.
Goto Edit -> Preferences -> Project -> Clock and ensure source "source" is set to audio.
Make sure the MIDI clocks are set correctly on your MIDI instruments.
Ensure there is no chance of MIDI conflict. Avoid MIDI Omni and select a specific MIDI channel in Sonar.
Any further issues please post your full specs (see my signature).
I suggest you troubleshoot in these forums first, that's what these forums are for, if anything it will perhaps be educational.
Cheers
Alex