I have a 9 years old 2005 Maxima. The engine is now experiencing the similar problem.
I had the engine light on a few weeks back. But, it never stalled. My mechanic replaced knock sensor, connector, and thermostat.
After service, the light went away. However, it started stalling. Last night, it stalled 4 times. The last time, the nice police gave me a tip, keep the rpm over 2000 to start it up.
I figured it stalled because the engine was missing gas. So I kept the rpm over 2000 even at the light with the other foot on the break. That's how it stopped stalling and got me home.
Looking at the dates of this thread, Maxima had this similar issue 1o years ago. I wonder if they never fixed it, this a separate design issue, or one shouldn't expect a 9 years old Maxima to run without issues.