Hello, welcome to Just Answer/Pearl. My name isXXXXX willdo my very best to assist you with your question today.
What is the make and model of the vehicle?
Also is the check engine light coming on?
yes the check engine is on but is being time before this start it to happen
audi a6 Quattro 2.8
Ok the issue that you are describing is a failing crankshaft position sensor.
The vehicle needs to be scanned for trouble codes.