Sites hosted on Cyberpanel running VPS not working on first visit

All my sites, wordpress or just an empty site ok my Cyberpanel running VPS, returns a 500 error on the first visit on most mobile devices. When the page is refreshed, the site works ok. I can replicate the problem when I browse my sites on incognito mode in chrome running Android. The same site when running on Virtualmin is alright. One of my wordpress site is https://isaimini.day , https://tamilrockers.day is just a plain site with no content. This too returns the same error.

Hello @brvnbld

First and foremost post contents of https://<IP Address>:8090/serverstatus/cyberCPMainLogFile Things you can try to solve most common reasons for 500 error:

  1. Upgrade your version:
$ sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)`

If using a sudo user rather than root, try this:

$ sudo su - -c "sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)"
  1. If the upgrade doesnt sort your issue change php version to 7.4 using CLI
$ cyberpanel changePHP --domainName isaimini.day --php 7.4 && cyberpanel changePHP --domainName tamilrockers.day --php 7.4
  1. To rule out the php sessions issue:
# start here copy line bleow me
$ rm -f /var/lib/lsphp/session/lsphp71/* && rm -f /var/lib/lsphp/session/lsphp72/* && rm -f /var/lib/lsphp/session/lsphp73/* 
# then copy line below me
$ rm -f /var/lib/lsphp/session/lsphp74/* && rm -f /var/lib/lsphp/session/lsphp80/* && rm -f /var/lib/lsphp/session/lsphp81/*
  1. Check this out MariaDB / MySQL Tweaks As Default & Option - #2 by phoros

Basically run nano /etc/my.cnf use the keyboard shortcut CTRL+W to search for skip-name-resolve and comment it out. Restart mariadb systemctl restart mysqld

  1. If all fails give me more logs to work with Troubleshooting CyberPanel - Docs - CyberPanel Community

Run command touch /usr/local/CyberCP/debug && sudo reboot visit all websites once rebooted and post contents of nano /home/cyberpanel/error-logs.txt here. Take a screenshot or copy-paste whichever you prefer.