Diabetic ketoacidosis (DKA) is one of the most feared acute complications of diabetes. It is basically a state characterised by hyperglycaemia and a metabolic acidosis with ketones present in the blood stream.
The bulk of the acid load comes from these ketones that are formed. Without even a bare minimum of workable insulin (as in Type 1 diabetes, or in rare cases of Type 2), fatty acids from our fat stores are liberated, sent to the liver, and used to create ketones. These ketones are all acids, and thus they lower the pH.
There is also renal hypoperfusion to account for. Hyperglycaemia osmotically draws water into the vascular bed from the cells, but it also causes water to be lost in the urine by the same method. This consistently high loss of water requires diabetics to maintain a higher-than-average input too. Failure to do so (especially if the ketones make the patient nauseous, or even cause him to vomit) causes intravascular depletion, which is fundamentally the first step in a DKA. This hypovolaemia causes the prerenal kidney dysfunction (which causes retention of the daily acid load) and a lactic acidosis from tissue hypoperfusion. Both of these factors contribute to generating an acidosis, although the ketones do make a larger contribution.