Almost all doctors recommend stopping metformin (a pill taken to control blood sugar in diabetes) at least 24 hours before any surgical procedure, endoscopy, or CT scan or other radiology study that uses certain contrast dyes. This is to lessen the risk of developing a rare but often fatal condition called lactic acidosis, which is the build up in the body of lactate. One of the brand names that metformin is sold under is Glucophage.