If its doing the spark knock thing, its because there is, at least periodically, too much fuel. Like it builds up (because its not firing, then when it does fire, there is too much. Maybe two things: one of both valves sticking open... doesn't fire, then they start working again. Check to see...