We consider the problem of scheduling a single server that must process several queues in some way, the so-called problem of polling. Such models lead to challenging problems in stochastic control and have a long history. Because of the difficulty of the general problem with possibly non-linear cost functions, with or without switchover times and costs, a heavy traffic approach leads to much simplification. A general averaging principle (an extension of results in [2, 3]) is proved. This result is fundamental in treating the control problems under heavy traffic. The result is used to get expressions for the switching rate and limit models when there is nonzero switching time.