I have been chasing a P0171 on a project vehicle for quite some time now. This is a 1999 4Runner with the 5VZ V6 engine, 70K miles, naturally aspirated. For this particular model-year there was no EGR.

So far everything I've looked at has been fine, and I'm wondering what the next logical thing to look at next is.

  • MAF sensor

    • out-of circuit ohmage @ 68F was within tolerance
    • in-circuit voltage generation fluctuated correctly, given steady streams of shop air
    • cleaned it anyway, and reinstalled
  • Fuel filter (factory original?)

    • Fuel dripping out of input side looked just as clean as fuel from output side
    • Replaced with new filter anyway
  • O2 sensors

    • Didn't know how to test rigorously, so just replaced
    • Now, after clearing fuel trim data the CEL comes back on even faster -- which makes sense to me, since I'd expect pristine O2 sensors to be more sensitive than dirty ones, and notice more uncombusted oxygen.
  • Vacuum

    • Squirted water at all vacuum fittings, no observable change in RPM.
    • Vacuum gauge connected to port just downstream from throttle body showed rock-steady 20 inHg at idle (700rpm). When cracking open the butterfly valve, vacuum would briefly drop before RPM increase, then head back up to 21inHg as RPMs settled to maybe 1500. While at ~1500RPM, the needle would barely fluctuate (maybe +/- 0.2 inHg, with a period of about 1 Hz). At time of test, elevation was 700 ft, barometer was 29.88 inHg
  • Other

    • Spark plugs have less than 10,000 miles on them. Haven't looked for fouling recently; perhaps I should.
    • OBD2 data suggests higher vacuum reading than the mechanical gauge: 24.5 vs 20.
    • I haven't checked PCV valves for proper operation; but at the least, they don't seem to be contributing to unmetered air (at least not at idle, or at 1500rpm @ low load.)

What should I look for next? I think my vacuum gauge results rule out valve problems. Since my P0171 code seems to only show up after highway driving, I suppose I could have an intermittent leak in one of my intake & manifold gaskets, that is dependent on engine load & RPM. But I'd rather avoid pointless tear-downs before that becomes necessary.

I'm thinking I should circle back to the fuel system, maybe check fuel pressure. And as far as PCV valves go, can a stuck-open one contribute to unmetered air?

Is there anything I'm overlooking?

UPDATE: freeze-frame data

  • engine load (calc) 31.0%
  • coolant temp 195.8F
  • STFT1 4.7
  • LTFT1 39.8
  • RPM 2915.2
  • speed 42.9mph
  • intake temp 125.6F
  • 1
    Have you looked at the exhaust to see if there are any leaks? This would be forward of the cats. Thinking about the exhaust manifolds. Anyplace you see soot, there's a fresh air draw, which could also show as lean. Commented Sep 9, 2018 at 23:39
  • 1
    What does freeze frame show when the code sets?
    – Ben
    Commented Sep 10, 2018 at 0:04
  • 1
    P0171 has so many possibilities it is best to start the diagnosis by recording a data log under various operating conditions for later analysis. If you have torque pro, this is fairly easy to do, and I recommend uploading it to pidfusion.net (disclaimer: my site) where I would gladly give you a 2nd set of eyes on it. Otherwise, since the code sets at a cruise, I would suspect fuel delivery and/or pressure and would test that next.
    – Milison
    Commented Sep 10, 2018 at 3:00
  • 1
    FYI this Q&A outlines how to test a 4-wire narrowband lambda sensor
    – Zaid
    Commented Sep 10, 2018 at 14:34
  • 1
    I’ll put this out there after looking at some of the answers. I’ve replaced more fuel pumps than maf sensors on tacomas and 4runners of that MY for lean conditions. The fact that it only sets under load is a big clue. If you put a scope on the fuel pump circuit you’ll likely see low draw and an irregular pattern from worn components.
    – Ben
    Commented Sep 12, 2018 at 3:03

5 Answers 5


The main cause of most P0171 codes on the 4runner is the MAF sensor, which also has the air temperature sensor on it, a faulty air temperature sensor on your MAF can cause a running rich problem. It's possible that the MAF may be the wrong one for the engine as well, or an inferior part, if it's a project car who knows what was done to it before you got it. It's worth checking on at least.

There's a 4runner site which has a forum thread on exactly this problem, and someone posted the diagnostic procedures:

1999 Toyota 4Runner 3.4L, Eng Cfg V6, Eng Des 5VZFE, USA/Canada

Hotline Archive With OEM Direct diagrams, components, TSBs, and R&R procedures

Number: 482996 Vehicle Application: 1998 4Runner 3.4 1999 Tacoma 3.4 1999 4Runner 3.4 2000 Tacoma 3.4 2000 4Runner 3.4 2000 Tundra 3.4

Customer Concern: Has a check engine light on and a code P0171.


  1. Monitor the fuel trim readings at idle and at 55 MPH driving down the road. If the numbers are low at idle but climb on a part throttle cruise, the airflow meter could be reading low or it may also have low fuel pressure. The mass air flow sensor grams per second should be 3.3-4.7 at idle and 12.9-18.3 at 2500 RPMs no load, if the readings are low the sensor could be bad.

  2. Monitor the calculated load reading on a wide-open throttle acceleration. The reading should go to 85% or more. If not, then the airflow meter could be faulty.

  3. Monitor the oxygen sensor inputs, both front and rear oxygen sensor signals. The oxygen sensor should not stay high or low voltage for extended periods of time. If the oxygen sensor shows low voltage and the fuel trim readings climb, check the performance of the oxygen sensor.

  4. Check the vehicle for a vacuum leak by spraying carburetor spray around the intake manifold while watching the fuel trim readings. If the readings change, there is a vacuum leak. Tech Tips: If fuel trim readings are high at idle and go down on a free rev, there is a vacuum leak. If the fuel trim readings are high at idle and at cruise, suspect fuel injectors.

Diagnostic Codes P0171

Confirmed Fix

225 - Mass Air Flow (MAF) Sensor 9 - Engine Air Filter, Mass Air Flow (MAF) Sensor 4 - Oxygen (O2) Sensor(s) 2 - Fuel Pump 2 - Heated Oxygen Sensor (HO2S) Bank 1 Sensor 2 (B1S2) 2 - Heated Oxygen Sensor (HO2S) Bank 1 Sensor 1 (B1S1) 1 - Front Oxygen (O2) Sensor 1 - Vacuum Leak 1 - Fuel Injector(s), Mass Air Flow (MAF) Sensor 1 - Cruise Control Vacuum Line 1 - Intake Manifold, Mass Air Flow (MAF) Sensor 1 - Mass Air Flow (MAF) Sensor, Throttle Body Cleaning Procedure 1 - Mass Air Flow (MAF) Sensor, Mass Air Flow (MAF) Sensor O-Ring 1 - Exhaust Pipe, Mass Air Flow (MAF) Sensor 1 - Air Intake Tube 1 - Mass Air Flow (MAF) Sensor, Throttle Body 1 - Air Fuel Ratio (AFR) Sensor 1 - Engine Vacuum 1 - Oxygen (O2) Sensor, Bank 1 Sensor 2

Using this as a guide compared to what you're already done I'd:

  1. Check the fuel pressure, if it's low look at the lines and the pump
  2. Pay special attention to the MAF, it features so much it's worth an extra look. If you can swap it out temporarily then do it
  3. You won't have plug fouling on a lean cylinder, if anything your plug should be too clean. Pull all your plugs and put them in cylinder order to make sure you know which one goes to which cylinder, then compare them. If one or two of them look markedly cleaner than the rest then diagnose those cylinders by checking their fuel injectors
  4. The diagnostic procedures say to check for vacuum leaks by spraying carb cleaner around the intake manifold and watching the fuel trims, it's worth following that advice
  • My MAF sensor is OEM, and as my question states, it has passed the tests called out in the Toyota service manual. I appreciate your point about #3. I think #1 should be my next focus. Commented Sep 10, 2018 at 13:09
  • 2
    A lean cylinder will show very tan on the plug and quite different from the rest of the plugs. The reason this is, is because when a cylinder runs lean, there's an excess of NOx created in the cylinder (read: lean runs very hot). Burnt Nitrogen (NOx) shows as a tan color (think the color of smog). Reading plugs can really pinpoint an issue quickly. Commented Sep 11, 2018 at 11:30
  • You are an asset to this SE, @paulster2. I really appreciate the time you put in here. Commented Sep 11, 2018 at 14:59

LTFT1 39.8

This sticks out like a burr. The lambdas are sensing 40% more air than what the MAF/MAP is measuring, either due to unmetered air or insufficient fuel.

Given that the MAF and lambda sensors have been inspected or replaced I don't think this is an issue related to false readings.

If there's a gaping air leak somewhere, it can be confirmed by blocking off the intake and observing that the engine continues to run.

Remember that vacuum leaks are not limited to just vacuum hoses, any place where unmetered air can make its way to the cylinders can have the same effect.

Update after brief chat

In light of the negative LTFT at idle, the unmetered air scenario becomes less likely, since unmetered air should give a positive fuel trim regardless of load.

The question to ask then is if there is anything that could cause improper fuel flow that is load-dependent. It turns out there is one such component: a vacuum-actuated fuel pressure regulator.

The consequence of improper fuel pressure regulation is out-of-spec fuel pressure. This can be verified by measuring fuel rail pressure, preferably at both idle and under load.

  • See this post for some creative ideas on how to test for vacuum leaks.
    – Zaid
    Commented Sep 10, 2018 at 14:51
  • This is precisely why I've focused so much of my attention on air so far. But another way to interpret that is that 40% less fuel than programmed is making it past the injectors. Commented Sep 10, 2018 at 15:48
  • If there is a gaping air leak, then it only happens at high RPM, under load. Never at idle. I say that because my trims @ idle are good. I suppose an interesting test might be: clear trim data, then wait for closed loop, and bump RPMs up to 3000 while parked. Watch STFT, and see if it spikes. Commented Sep 10, 2018 at 15:53
  • I like your idea about blocking off the intake. I'm not hopeful it would work this time, for the reasons I give in previous comment. But I will add it to my mental tool set. Commented Sep 10, 2018 at 16:40
  • What LTFT value do you have at idle?
    – Zaid
    Commented Sep 10, 2018 at 18:13

Replace the MAF sensor. In looking at your freeze frame data, LTFT shouldn't be that high. Look at Airflow g/s and it should inrange of 3.0 - 4.5. Since your freeze frame is at 42mph rev motor up to sbout 2500 and airflow g/s should be in range of 12.5 - 18. If either are not in range replace the MAF per Toyota.

  • Thanks for the the answer/reply. It turned out that my MAF sensor was actually a combo MAF and temperature sensor, and early on in my troubleshooting efforts, I had mistakenly only cleaned the temp sensing element. Commented Feb 4, 2021 at 19:14

Go back to beginning. Re-think what you have checked and why. Only 5 probable conditions/reasons for lean burn DTC, #1 is WEAK SPARK. Examine/test plug wires, ignition coils and housings. One anecdotal account to consider: Coming home from the lake I suddenly got the flashing-omg-stop now signal from the instrument panel. Lean on right bank. Long story short the #1 plug had a cracked insulator that only was an issue after about 100 miles on the new plugs freshly installed the week before when I had the wires and plugs changed because a faulty O2 sensor caused spark plug fouling on that bank from running rich.

  • 2
    How would a weak spark cause a lean condition? A weak spark would (if anything) introduce an incomplete burn, which would cause a rich condition. You also state there are five probable reasons, and put the weak spark at the top. Do you have any references for any of this information or a list of the five "conditions/reasons" with explanation what you're talking about? Commented Sep 12, 2018 at 11:39

You haven't considered dirty injectors. Put Marvel Mystery Oil into the gas tank at a treat rate of 2 oz. per gallon, then floor the car 45-75 MPH on the highway five times in a row.

  • I regularly use injector cleaner, so I doubt doing it again right now will cure this problem. I do agree that my problem could be insufficient fuel, rather than too much air. And that might end up being from clogged injectors. However, that will be the last thing I consider, since it requires so much labor. I think it makes more sense to check the fuel pump first. Commented Sep 10, 2018 at 13:06
  • 1
    You recommend this product in nearly 3 out of every 10 answers. If you are affiliated with the oil then you need to disclose it, else risk having such answers flagged as spam.
    – Zaid
    Commented Sep 11, 2018 at 7:26
  • @Zaid I'm not affiliated in any way with Marvel Mystery Oil. It is not against the rules to mention a product if I think it is appropriate. So many of the postings I see on this site are due to dirt and deposits. You and so many other expert posters never recommend cleaning with additives. Big mistake! MMO has solved so many problems for me that it cannot simply be disregarded as "snake oil" out of hand. Why am I so frequently attacked for sharing my experiences? Isn't that the value of an Internet forum. The poster can take it, or leave it!
    – Carguy
    Commented Jan 21, 2019 at 22:58
  • @Carguy because in a non-trivial amount of modern engines MMO does more harm than good. There are circumstances where it can help but blindly using it as some sort of panacea is foolish. Several manufacturers (Ford and GM to start with) explicitly advise against using MMO or similar. Many proponents of it suggest that it can't do any harm, the NTSB disagrees Commented Jan 22, 2019 at 11:11
  • That NTSB report is the only example on the Internet where you will find MMO implicated in engine failure. What sort of evidence leads you to say that "in . . . modern engines MMO does more harm than good"? In my experience with several Ford and Mercedes-Benz models built in the last 10-15 years, I have had nothing but improvement by adding MMO to gas and oil -- improved acceleration & gas mileage, reduced oil consumption, sludge & tailpipe emissions, startup noises & oil leaks eliminated. In fact, MB recommends the Techron additive in gas and doesn't forbid MMO.
    – Carguy
    Commented Jan 27, 2019 at 9:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .