Grimsby Magistrates' Court was told that the leak happened during a maintenance shutdown that takes place every four years.
One of the planned tasks during the shutdown of processing units, pipework, vents and drains was the connection of a new 1 km-long butane line between two processing units.
The Health and Safety Executive (HSE) found that the contractor who connected the pipework had not checked the whole line to ensure it had been properly installed and all the valves were closed.
The pipework also should have been pressure tested before flammable substances were introduced, it said.
As a result, a high-point vent was left open and about 50 tonnes of butane leaked on 26 March 2015, over a period of nearly four hours.
There were about 1,200 contract workers on site in addition to more than 500 Total LOR employees at the height of the inspection and maintenance work, the Grimsby Telegraph reported. No health issues were reported.
Total LOR pleaded guilty on 1 February to breaching reg 4(1) of the Control of Major Accident Hazards Regulations 1999 for failing to take necessary precautions to prevent a major accident that could impact people and the environment.
It was fined £400,000 plus £15,975 costs on 22 February.
Total UK was fined £1.4m in July 2015 after a contract worker was killed in a major fire that broke out at the Lindsey Oil Refinery in 2010.