Error during geometrical optmization

I am doing geometrical optimisation of an organic molecule on a surface. During this i encountered a message **** Too many failed attempts to optimise **** and my gulp job shut down. What is the cause of this error and how can i avoid it ?

Hard to say exactly from just the message alone what the issue is. However, failed optimisations usually mean there is an issue with the force field you are using. In particular, if your potentials aren’t smooth (i.e. if you have discontinuities due to cutoffs) then any optimiser will fail since the energy landscape isn’t continuous. So I’d check your potentials and use tapers to smooth any cutoffs where possible.