My check engine light has turned on several times when I am towing my boat and it starts stalling on

I have a 2006 Jeep Liberty. My check engine light has turned on several times when I am towing my boat and it starts stalling on exceleration. When I unhook the boat and drive a short time, the next time I start it up the check engine light is off and it drives just fine. I replaced the Camshaft and Cranshaft. The engine light and stalling has happened on occasion when I am not towing the boat.
Any help would be greatly appreciated
Any help would be greatly appreciated
0
Answers