Running Rough, Throwing Codes
My 99 5.4 Triton powered Lariat is going through a bit of a rough patch 
We went for a longer road trip when suddenly on the way back it started running rough and we could hear a loud... pinging/wrapping? We only hear it when accelerating, but it is of course concerning.
Codes: P0171 and P0113. After clearing the codes and driving it home from Dad's, only the P0171 came back-- but this was a lot shorter drive than the three hours we limped it home.
So, clearly I have some ideas about what the codes could mean (thanks google) but the real question is what is the common/usual problem when this engine throws these codes?

We went for a longer road trip when suddenly on the way back it started running rough and we could hear a loud... pinging/wrapping? We only hear it when accelerating, but it is of course concerning.
Codes: P0171 and P0113. After clearing the codes and driving it home from Dad's, only the P0171 came back-- but this was a lot shorter drive than the three hours we limped it home.
So, clearly I have some ideas about what the codes could mean (thanks google) but the real question is what is the common/usual problem when this engine throws these codes?
Thanks, will go over it with a fine tooth... Cleaned the MAF and another sensor right by it and things seem better-- no longer running rough, more power, but still have that sound although not as bad. Best way I can describe it is like a hammer drill. Emissions on the tester are now in the yellow instead of the red.



