Well, there could be some settings causing this, or your system could maybe not have enough horsepower (or have a Wi-Fi adapter), or one or more plugins could be causing latency spikes.
It makes it easier for us to help you if you post your system specs in your forum profile's Signature section, as it gives us an instant snapshot of what you are running, which speeds up the debugging process (not always, but many times it does).
If you look at the bottom of my post, you will see my specs (as an example) - to post yours in all future posts, go to the top of the forum page and click User Control Panel, then click on Signature and Comment, then add your specs, check the box to 'always attach signature to post', then click Save Profile.
In any case, I would like you to post the following information:
Audio Interface: Sample Rate, ASIO Buffer Size
Sonar: Driver Mode, Sample Rate, Record Bit-Depth, Total Roundtrip Latency (All of the Sonar info is in Preferences)
The above will tell me if your settings are out of whack a bit, and if so, they can likely be set to where you don't have these dropouts.
It is also possible that one or more plugins are causing the latency. You can quickly test this by hitting 'E' on your computer keyboard - this will temporarily 'Bypass All Effects'. If your dropouts go away, then indeed one or more plugins are causing the problems. (Hit 'E' again to turn effects back on when done).
Some plugins are not meant to be used in tracking (recording), but instead are meant for mixing/mastering. These plugins, by their design, use either look-ahead processing or require high CPU cycles to do what they do. If these are causing your dropouts, then swap them out for less demanding plugins - just while you are recording your tracks, then when ready for mixing, put those plugins back in and make your ASIO Buffer Size large enough to accommodate the extra demands of these plugins. This is what most folks do, keep latency low for recording, then raise it and put in the plugins meant for mixing/mastering when you are ready to mix.
If you have a Wi-Fi adapter, this often causes big latency spikes, and turning it off or disabling it prior to firing up Sonar will often get rid of dropouts (common issue with laptops running Sonar. but some folks use wireless on desktops).
I hope the above helps.
Bob Bone