Whenever I season my cast iron pan with canola/rapeseed oil it turns sticky after a few weeks. It also gets sticky on the bottle and glues the cap on sometimes. When I season it with coconut oil, it doesn't get sticky and looks beautiful. Why does rapeseed oil get sticky but not coconut oil?
It is a chemical quality of the oil called "iodine number". There is nothing you can do about it, it is as inherent in the oil as its smoke point. Oils with a low iodine number create hard polymers, and oils with a high iodine number create soft, sticky polymers.
If you want a hard, nonstick surface on the pan, choose the right oil. Coconut oil, Palm oil or lard give you a good finish, while many polyunsaturated oils give you a soft finish. Linseed oil is the worst of all, it's very gunky.
Note that many sites will suggest seasoning with high iodine oils, especially linseed, because it is easier to get them to polymerise. I personally don't like this recommendation - as you discovered, the resulting polymer is low quality.
From what I've read, the answer is that the oil will be sticky when the oil is not cooked sufficiently to finish both polymerizing and the carbon deposition. This is a chemical reaction, and like any endothermic chemical reaction takes some combination of time and heat to occur.
From Science of Cooking:
Note 3: If highly unsaturated oils are used and too low a temperature they will not completely polymerize leaving a sticky layer. The problem with this sticky layer is that it is still prone to further oxidation and can therefore turn rancid. Low temperatures do not completely polymerize and break down oil and will leave a brown, somewhat sticky pan instead of a black, nonstick one. 400-500 degrees F is the effective range for seasoning.
Canola (rapeseed) oil has a smoke point of 400°F or so, while Coconut oil is much lower - 350°F. That smoke point is about where the process should be - it can be above it, but below and you won't get as good of results (and it will be more likely to be sticky). See this explanation of how the process works (same site as above):
The development of a seasoned cast iron pan is actually a two part process: polymerization and carbonization. The first part involves developing a thin layer of polymerized oil on the cast iron.This is done by applying a very thin coat of unsaturated oil (e.g., canola, flaxseed or grapeseed oil) to the cast iron surface and heating it in an oven until it dries. Unsaturated fats work better since they have less hydrogen's and therefore have less non-carbon components. Once the polymerization process is complete the layer of oil cannot be easily removed. To complete the seasoning, which involves laying down of a carbon matrix on to the cast iron surface, heat must be applied slightly above above the smoke point of the oil. If you do not heat above the smoke point only the polymerized oil coat will be present instead of having an added rich black carbon matrix.
You also may have too thick a coat of oil - as more oil will of course take longer to polymerize.
One recommended oil to use is Flaxseed oil, because it has such a low smoke point that it can even polymerize without heat (though you don't get the nice black coating if you don't hit that smoke point).