From your description I suspect your problems lay in two feilds those being 1. a partially blocked pilot jet and 2, a possible weak thermocouple lead.
You would be well advised to seek the services of a suitably qualified gasfitter to undertake the remedial work for you to both make sure the work is done correctly and safely.
Do NOT play with gas appliances yourself unless you are suitably qualified – a little knowledge can be a very dangerous thing with gas appliances.
Selgas Services Ltd
Craftsman Gasfitters, Plumbers, Electrical Service Technicians