The best time to restructure is before you have to. Early signs include a facility expiring within a year, an annual review with new conditions, pressure on covenants such as interest cover, or repayments that no longer match your cash flow.
Options include extending terms, a period of interest-only repayments, consolidating several facilities into one, moving to a lender better suited to your situation, selling an asset to reduce debt, or using a short-term non-bank facility while the business recovers, with a plan to return to a bank.
Lenders respond to a credible plan: up-to-date accounts, a realistic cash-flow forecast and a clear explanation of how the new structure improves the position. Involve your accountant early. If you've received a formal demand or default notice, get legal advice straight away.