I had a similar problem. I can't remember the codes that were thrown, a progressive fix of the crank ventilation and pollution system fixed it.
Check all your hoses and pipes, especially the ones under the manifold, connecting to the engine and also the PCV (sometimes called the pancake valve).
I had a buggered PCV, crank case vent pipe znd the crank vent check valve.
Replaced them no problems since.