My mosfet is heating, can't understand why

link=topic=124963.msg940899#msg940899:
MOSFETS only get hot when they're not completely switched on. When they're completely on or off their resistance is so low/high that the power dissipated by the MOSFET is negligible.

WHAT?

When a MOSFET is completely on its resistance will be <= Rds(on) [max]. (Provided Vds << Vth). Its power dissipation is I-squared-R which can be extremely large. It all depends on the values of I and R. 30A and 0.01ohm gives 9W, 10A and 0.2ohm gives 50W, 4A and 0.006 ohm gives 96mW. 96mW needs no heatsink, 9W needs a big heatsink, 50W requires large heatsink and/or water- or forced-air-cooling.

You have to calculate the on-state dissipation.