Really slow response time from server

I searched through some posts where users were complaining about slow response times and tried to troubleshoot some of the issues that users mentioned.

However nothing I have done so far has helped with the response time from the server.

If I ssh into the server it is really quick with really low latency.

However when I make requests via the domain it takes anywhere from 10 seconds to 60 seconds to get a response.

Usually the server returns with a timeout error and says the host is unavailable.

Sometimes the page loads the actual page but most times not.

I used a curl test that someone recommended on another post.

The domain in question is https://adultluxury.bermont.xyz
It is hosted on an ec2 instance in the af-south-1 region

These were the results from the curl test:

curl -o 'Cache-Control: no-cache' -s -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" https://adultluxury.bermont.xyz

Connect: 0.033826 TTFB: 35.767073 Total time: 36.049827

curl -o 'Cache-Control: no-cache' -s -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" https://adultluxury.bermont.xyz --resolve 'adultluxury.bermont.xyz:443:[ip.address]'

Connect: 0.009816 TTFB: 51.655999 Total time: 51.685886

Can anyone assist or advise as to where im going wrong,

Kind Regards,
Luke

Managed to resolve the issue,

A plugin seemed to have been creating an infinite loop on the origin server, or something of the sort, removing the plugin in question solved my problems