(you clearly haven't even looked in your cgminer logs to see if it says anything about why it's happening when it happens)
My API commands are a shortcut to seeing some of the possible errors that may have been logged.
We have no info at all about what hardware you are running.
The most common cause of freezing is that your GPUs are being pushed too hard (as I mentioned about stepping them down a bit) or there is something wrong with one of your GPUs.
... and on a slight tangent
![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
... I had my first GPU hardware issue with mining this weekend ... one of my 2x6950's seems to have a fan problem on one of the 3 fans
They have both been mining for 10 months now - but not non-stop I used to switch them off for 6 hours a day when BTC was below $4
Anyway, I'm impressed - 10 months of card abuse and the only problem on 2 cards so far is a single fan needing something done about it
![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)