The webhost. Why would it work...then not work...then randomly work?
Your webhost will blame it on us but you've seen it work too.
What happens is that webhosts "oversell" the space. You get too many people on there and things start going sideways - databases in particular slow down and/or have more severe problems.
It's a very low margin business (webhosting) and they have to oversell to make a profit.
I've had the same problem a few times over the years. With one host I was able to move my db to a different database server and it would be great for a time. Once a bunch of people got on that server I would move again. Easy for me to do...not easy for everybody else.
The less you pay per month for hosting the more likely it is you could have this kind of problem.
If you can choose a different db server then try it - with Cpanel setups though you usually can't.
You could experiment and try a different webhost and see how it goes...
You could talk to your webhost about the problem but, what I've seen over and over the past 8 years, they will take the low road, do nothing, and blame the scripts. It's pretty frustrating...