Subaru Outback 1997 Overheating with Air Conditioning

I have a 1997 Subaru Legacy Outback with over 170K on it. The other day I was sitting in traffic in 100 degrees (moving ~5mph at most for about an hour) with the air conditioning on and noticed that my engine temperature was climbing (I could watch the dial move up). I turned off the air conditioning and the engine temp dropped. I turned it back on and the temp rose again. The next day I checked the oil and water levels, and they were fine. This model has electric two fans mounted on the radiator.

Any ideas what could be causing this problem?

Most likely, the second cooling fan is supposed to be activated when the A/C is on, but that it is not activating. Have you lifted the hood while the car is running with the A/C turned on so that you can see if both fans are running?

When I started the car neither fan was running. When I turned on the AC the left fan (looking from the front of the car) started immediately. I need to get the engine temp up and see if the right fan ever comes on, if not, then something is wrong with my normal fan (temp sensor, solenoid, etc.).
If the normal/right fan does not come on when the engine temp is up, what are the most common cause (broken part)?
Thanks…

A bad fan motor, a bad relay, or a poor connection would be the most likely causes if the other fan never comes on. My vehicle, a Chrysler, will turn on one fan immediately when the A/C is started, but the second fan will cut in and out as needed. It all depends on how the computer is programmed to manage the system. But if your temp gauge is climbing past normal and both fans aren’t running, you definitely have a problem.