My website keep going down “502 Error Bad Gateway”

Hey guys, hope you are all doing okay.
My website
www.icodes.000webhostapp.com
I made a website two weeks ago and installed wordpress everything was working fine till few days ago
Whenever i change the theme the website goes down for half an hour and comes back
But now it goes down for a long time at its own without doing anything and when it comes back i get that message "One or more database tables are unavailable. The database may need to be repaired."
After repairing the database it works for some time and goes down again "502 Error Bad Gateway"
And the dashboard goes down too.
Whenever it works, the website and the dashboard are really really slow.

Please help me

Hi @teamappled!

www.icodes.000webhostapp.com

000webhost no longer supports www in front of subdomains. If you want to access your site please browse your subdomain directly: icodes.000webhostapp.com. If you want to change your website address, you may need to link a domain to your site.

One or more database tables are unavailable. The database may need to be repaired."
After repairing the database it works for some time and goes down again “502 Error Bad Gateway”

We currently experience no downtimes on our side, and your website is loading just fine (a little laggy though; please read this topic for more info). Please clear your browser cache and try again.