One should put enough oil in the menorah so that the lights will burn until at least one half hour after night (Tzes Hakochavim – i.e. 72 minutes after sunset according to Rabbeinu Tam). Thus, if lighting close to sunset one should put enough oil to burn for appx. 1 ½ hours.
Shulchan Aruch with Mishna Brurah 672:1 and Bi’ur Halacha
If the lights burn out before night, one should relight them without a bracha, so that they burn for at least one half hour after night. Shulchan Aruch with Mishna Brurah 672:1 and Bi’ur Halacha.