I sort of guessed that.
Which means it can contain a dozen possible points of failure.
Which we can only guess at, since you don't want to post it.
Nobody else is reporting the mysqli is acting up, as far as I can see in this Forum.
So, my guess is that your script is at fault, not the server on...