P0171: oxygen sensor in bank 1 has detected a lean condition (too much oxygen in the exhaust). the side of the engine that has P0171 is one of the more common trouble codes. This code is triggered by the first downstream (front) O2 sensor.
Bank #1 refers to the side which has cylinder #1, In a 4 cylinder it is the cylinder in the front of the engine. The downstream O2 sensor monitors the condition of the catalytic convertor. If it senses O2-Houston we have a problem.
There could be a vacuum leak downstream of the MAF (Mass Air Flow)sensor.
The MAF sensor is essentially is a sensor with a hot platinum wire and a thermistor. The idea is to maintain the same temperature in the wire. When the air flows over the wire cooling it. The current required to maintain the temperature is proportional to the air flow. Very accurate and responsive.
Possible cracked vacuum or PCV (Positive Crankcase Ventilation line/connection)
Faulty or stuck open PCV valve Failed or faulty oxygen sensor (bank 1, sensor 1) The up stream sensor tell the ECM how to keep the air fuel mixture
optimum.
Sticking/plugged or failed fuel injector Low fuel pressure (possible plugged/dirty fuel filter)
Exhaust leak between engine and first oxygen sensor. The leak fools the sensor triggering the lean condition
The MAF (Mass Air Flow) Sensor is dirty or faulty. Can be cleaned with disc brake cleaner or anything that doesn't leave a residue. Ordinary throttle cleaners will leave a residue and render the sensor useless. Be very careful when handling a MAF sensor they are fragile and expensive.