Engine shuts off ocationally when hot

I have been having an occasional engine stalling problem on my 2004 Nissan Sentra. The engine shuts off when driving and on idle, without any presiding symptoms, such as struggling . The problem is very occasional. It happened once last year over the summer, as well as two times in the last week. The three times when it happened the weather was hot, and I had driven the car 40 mins or more. When I tried to reignite the engine, it would start and stop immediately or within 10 seconds. There were no error codes from the problem. After I let the engine to cool down for a bit, 20-30 mins, it would starts and runs normally.

Some history: I had a similar problem two year ago, in more severe form. A mechanic suggested that it may be caused by a faulty oil pressure sensor/switch. The sensor of these cars may fail sporadically when it gets hot, and the computer shuts off the engine. When the temperature drops, the sensor recovers and all is fine. I changed the sensor and, indeed, this solved the problem.

It is possible that the new sensor is misbehaving too (I will change it as a precaution, as it is cheap). However, I am wandering what else may be causing the problem. More precisely: what else may cause the engine to shut off when hot, without error code, and run perfectly when cooled sufficiently.

Something else: I have been living with a P0128 code for some time. My feeling is that it is an independent issue, but I mention it in case I am wrong. (I decide to address it finally, so I am chaining the temperature sensor and the thermostat.)

That’s one of the symptoms of a failing crankshaft position sensor.

The crank sensor informs the computer whether or not the crankshaft is rotating. If the computer loses the signal from this sensor, the computer thinks the crankshaft is no longer rotating. So the computer see’s no reason to operate the ignition and fuel systems, So the engine shuts off.

A failing crank sensor doesn’t always set a trouble code. That’s the frustrating thing about failing crank sensors.

The P0128 code indicates the thermostat is stuck open.