1995 Maxima running rough

I have a '95 Maxima that just turned 160k miles that just recently started running rough especially at idle. It is even worse when I turn the A/C on. Two years ago I had the fuel injectors, mass airflow sensor, and air intake valve replaced. The exhaust pipe rusted through just behind the engine a couple months ago, but i was told that shouldn’t effect the idle. It doesn’t run any louder due to this. The brackets hold the exhaust pipe in place so it just rattles a little bit but no noticeable problems due to this. Any advice appreciated. I bought the mass air flow sensor on ebay for $30. Could it already be dirty or need to be replaced after two years?

Is the Check Engine light on?

Tester

I wouldn’t dismiss the exhaust leak as the cause. The engine will suck outside air into the exhaust system through that opening, and if that air comes in contact w/an o2 sensor, that will confuse the engine computer to no end. The engine computer presumes everything that comes out the exhaust is derived from what came in through the throttle valve and injectors. Modern engines need to be air tight to run correctly. Suggest to fix the exhaust problem as number one priority. If that doesn’t fix the rough running, come back here for more advice.

yes, and at highway speeds it was flashing.

You have to stop driving the vehicle.

A flashing Check Engine light indicates a major misfire is occurring. And a major misfire can cause damage to the engine/catalytic converters.

With the mileage on your vehicle, one thing that can cause this problem is a worn timing chain and guides.

Tester