My site admin is slow

Our website seems to be freezing in the back-end and going slowly. We are trying to edit orders in WooCommerce and have a couple of windows open but they freeze and take a long time to respond. It also throws a 502 Gateway Timeout error at random points. Please advice.