The electromagnetic field generator is a device on M7G-677, created by the Ancients, which emits an electromagnetic field, rendering all electronic technology inert. While it may only cover a small part of the planet, Doctor Meredith Rodney McKay was able to expand the field without a significant power outage. Later, Dr. Radek Zelenka was sent to repair the field.
After McKay's modifications to the device, it started having problems and required maintenance on several occasions. Dr. Radek Zelenka was sent to help repair the field on one of those occasions, and got stuck there due to suspicions of a bomb on Atlantis.
The device was malfunctioning the day after John Sheppard's father died of a heart attack, forcing McKay to help with the repairs of the device instead of going back to Earth with Sheppard to attend his father's funeral with Ronon Dex ultimately going along in McKay's place. (SGA: "Childhood's End", "Critical Mass", "Outcast")