2003 nissan v-6

engine cuts out above 2500 rpm and can harly hold an idle

Odometer mileage?
Complete maintenance history?
Presence of an illuminated Check Engine Light?

My assumptions:

High mileage.
Unknown/spotty maintenance history.
Yes.

Those are my assumptions also, but it would be nice if the OP responded to my questions so that we can all give it our best shot.

Further assumption: OP knows nothing except where the ignition key and where the fuel goes.

I’ll give the OP a list of things to look at:

Faulty Ignition Coils
Faulty Spark Plugs
Faulty MAF Sensor
Faulty Crank Position Sensor
Faulty Cam Position Sensor
Plugged Catalytic Converter
Damaged Cylinder Walls from Converter Catalyst material that has broken free, and caused damage
Plugged EGR circuits from Damaged Converter Catalyst material
Dying Fuel Pump

I can go on with more potential issues.
I have a bazillion of them.

BC.