Hubs overheat. For those pushing 1kw, 10kw pulses, or even crazy amounts like 40kw as liveforphysic's did to his poor custom wound, custom ventilated "flaming dicks" hub motor special precautions must be taken. For those who are fine using their 500w rated hubs at stock voltages and power levels then read no more. If you want to overvolt, climb massive hills, or pull big loads, you should add a temp sensor to your hub.
These are popular models for hub motors. You may be tempted to scrounge on ebay for a better deal, but almost all only go up to 100c; way to low for our uses. The top two are made for the R/C crowd, and can monitor high temps. The BBQ monitor can also do this, is readily available, and only needs slight modification. All of these have over temp alarms. My preference is for the Hobby King VT because it can run off of my 12v dc-dc converter and doesn't require it's own battery. It will also power up when I power up my bike (one less thing to worry about!) That being said, some people find it's max temp of 150c to be a bit on the low side, and I tend to agree with them. However, for most people it's a great and easy to implement solution.
You can see on Nicobie's hub here that the copper windings are blackened. It's not the copper itself that burned, but the thin layer of varnish insulation that burned out and shorted the windings together. This kills the hub motor. This usually happens well before anything else can go wrong, but occasionally a too hot hub can cause the insulation of the phase and hall sensors inside the axle to melt and short together. This can be remedied by upgrading to larger phase wires, installing big wires and bullet connectors out side the hub as heat sinks, or by monitoring the temperature of the hub.
I suggest doing this mod while you upgrade your phase cables. You can see I didn't plan out this mod very well, and I have a mess of spaghetti. Don't do this. The best place for the temp sensor is right on the windings and as close to the magnets as possible; this is probably the hottest part of the motor. Because of the shape of sensor this was not possible with the VT.
I used an epoxy rated at 150c. I would of liked it to be rated for higher temps, but it was the best I could find locally.
Why 150c anyways? Well, I guess it depends on how reliable you want your bike to be. The insulation of the magnet wire in the windings is of unknown origin, and while I'd like to think it was rated at 150c, I have no way of knowing. Since it could be anything from 100c up to 250c, I like to error on the safe side. Some people have reported failure at 200c, while others have had problems at much lower temperatures. There is something to be said for day to day reliabilty compared to pushing a motor to it's extremes on your weekend off. It's totally possible to take a motor well beyond it's rated temperature for half an hour with the only problem being a nasty smell and some smoke. But I don't want to test my luck every day, so set my alarm at 140c and back off when I get there.
What makes hub motors overheat anyways? Well, heat from too much power obviously! But it's not just raw power alone. Using wrong hub motor for the wrong job will; using a fast wind hub motor with low resistance that sucks up a lot of amps is dangerous on an overvolted setup in its own right. Especially when climbing hills. When climbing hills, even a slow wound motor is at risk.
Ebike.ca has a new simulator and it's great. You can see here a "slow" 9x7 wind hub with a 66v (18s lipo) pack. On the left it happily runs on the flats at 33mph. On the right it overheats in 10 minutes tackling a hill at 30mph. Why does it over heat? The 3mph difference is enough to decrease the efficiency at which it runs from 81% to 76.5% efficient. Of that 2195w the hill climbing bike is pulling from the battery about 100w is lost to the controller and other ineffecienes, and the other 400w is lost in the motor in the form of heat. The motor becomes a space heater, and quickly cooks. Ventilating the hub DOES help here, but perhaps not enough. In any case, the slower a motor turns, the more starts and stops you do, and the more hills you climb the less efficient the motor runs and the hotter it gets.
But wait, there is more! The hotter the copper gets, the farther apart the copper atoms and their electrons are. This results in less conductivity; meaning, even less efficiency and MORE heat. How bad is it? For copper, the difference in resistance at 20c (68f) compared to at 100c is 130%. From 20c to 150c the difference in resistance is 150%. This is a HUGE deal. Not only does running the motor hot noticeably decrease range and make for a "boggy" feeling ride, but it also explains why motors tend to over heat so quickly and unexpectedly; one moment they're fine and the next smoke is pouring out. Once you get it hot enough, that extra inefficiency makes it very easy to push it over the edge.
So don't be a fool,
use a temperature sensor,
and keep rolling cool