We live in an apartment and do rent but we are only getting lukewarm water it will not get above about 90 to 95 degrees Fahrenheit. Our maintenance man has been over here trying to figure it out but no such luck. For some reason when we turn off the cold water valve going directly into the hot water tank the water starts to heat up. But when we turn back on the cold water it stops working. I know the cold water will cause the rest of the water temperature to drop. But we've waited hours and for some reason it will still not heat up. They have changed out both the thermostats and heating elements but to no avail. If anyone has an answer that would be most helpful. Thank you and please help!
I suspect the pipe that puts water into the tank, known as the dip tube, is broken inside. So when you use hot water, the cold water enters at the top, when it should enter at the bottom. This would be the case if by "heating up" you mean the temperature of the water coming out of your hot water taps.
Like Tiger Guy said, the dip tube might be broken, but and here's the big BUT.... The hot and cold connections might be reversed. Normally this results in trapped air near the top of the tank, sometimes enough to expose the upper heating element, that's not at all good! but if your pressure is high enough, it might submerge the element. Do you hear any "whossing" sounds from the water heater when hot water is being used?
Another possibility is that you have a leak. When you have a big enough leak, the water never has a chance to heat up. Instead, the warm water leaks out and is replaced by cold.
In that scenario, turning off the cold water stops pushing the water out of the hot water heater to the leak. So the water in the tank heats up. Then you turn the water on again and you can get hot water. But if you turn off the faucet or shower, the remaining hot water leaks out and you're back to never fully heating the water in the tank.
You can tell if you have a leak by turning off all the faucets and checking the water meter. If the water meter shows flow with everything off, there's a leak. The next step would be finding the leak, which is worthy of its own question.
If you establish that there is not a leak, then you can reexamine the other possibilities.
Another possibility, although not likely, is that a bypass is open.
Sometimes in apartment or commercial buildings, a pipe and valve is installed to bypass the water heater so that water can run in the hot water taps while the heater is being swapped out.
A failed shower mixing valve can also act as an open bypass.
If the bypass is open, water will circulate through the heater even when the taps are closed, plus, the bypass will mix cold water with the hot when a tap is opened.
Very simple problem to repair all hot water systems have a non return value fitted to the cold inlet at the bottom of the hwu clearly this valve no longer stops hot water from getting into the cold feed so if you turn on a cold tap it can draw the hot water out and than exess cold water refills the tank therefore making the hot water luke warm