Heat the oil in a large, heavy-bottomed saucepan on a low heat and add the onions, garlic and ginger. Cook with the lid off, on the lowest setting, for at least one hour, stirring regularly. If the mixture starts to catch on the bottom at any point, add a splash of water.