What is wrong with my car?

I have a 2004 Mazda mini van. It intermittently shuts off while I’m parked and the motor is running and I need to have someone boost me. I had a mechanic check the alternator and the battery and everything came back fine.
Obviously it’s not fine and I’m wondering if the mechanic got his license of a match box. Anyways, do you think it is the battery or the alternator. The battery is only 3 1/2 years old. The last time the car shut off the gages started doing crazy things and the clock turned off then the motor stopped.

Any ideas?

Tough to diagnose, but I’d start with a loose/bad battery cable.

yes, always start here. a loose or corroded battery connection can cause this very issue. It’s also important to check the negative battery cable where it connects to the body/engine and make sure that connection is secure.

Yep. I’ve run into that on several cars. One (a Mazda 626 in fact) would occasionally die while running… the day it did that on I-395 southbound from Washington DC was a rare treat. It got restarted in a minute or so, fortunately. Not precisely the behavior the OP describes, but once the connectors were cleaned up it was fine.

Similarly our 1996 Dodge Caravan went nutso - all the chimes were trying to sound halfhearted beeps, random clicking, nothing would start - turned out to be a battery cable mess issue.

Those crazy signs you saw are those of a voltage dropping in a modern system.
That could be the battery, cables loose or other things. By the way, a 3.5 year old battery is on probation in my book. I don’t care what the guarantee is.

The really good mechanic’s licenses reportedly come in Cracker Jack boxes, not match boxes. I know this for a fact.

As others have said, check all your connections.
I have seen this same problem when the battery and/or alternator is not grounded to the chassis.

Thanks for all the replies! I will update you and let you know if you were right.