I would suggest starting with the following settings, for recording sessions in Sonar:
Audio interface: Sample Rate 48 k, ASIO Buffer Size of 128
Sonar: Driver Mode of ASIO, Sample Rate 48 k, Record Bit-Depth of 24-bits - try to get your Total Rountrip Latency down to around 10 milliseconds or just under.
Once you get your settings as noted above, please test them out in a new project with no loaded effects, just to make sure all is well.
If you are having dropouts with those settings and no effects, then I would suggest you look at other background services that may be interfering with Sonar's operation, such as antivirus software, a Wi-Fi adapter, that sort of thing. DPC Latency Checker or LatencyMon running for a few minutes WITHOUT Sonar running will give you an idea of your computer's basic ability to handle audio streaming, such as what Sonar does.
If the above testing works, and you do not have dropouts, then I would suggest that one or more plugins (effects) in whatever projects are having dropouts are not really meant to be used in the recording process, but instead are meant for mixing/mastering. This can be tested by loading one of these projects, then hitting 'E' on your computer keyboard, which will toggle on/off Bypass All Effects. If your dropouts go away after hitting 'E', then you need to look closely at each effect, to make sure it doesn't do 'look-ahead' processing or otherwise consume giant bunches of CPU cycles. Things like Boost 11, Perfect Space, and LP-64 EQ all can cause massive recording latency, and should only be loaded into projects during mixing/mastering.
I truly hope that above helps you,
Bob Bone