Have you already tried a forced restart of your iP8+ ???
Press and quickly release the Volume Up button. Press and quickly release the Volume Down button. Then press and hold the Side button until you see the Apple logo. When it appears, release the Side button, wait for your device to restart, then test it.
If you get no help, next troubleshooting step is to install a fresh copy of your iOS (it could be corrupt).
To perform that procedure, make a full backup of your device, then restore it to factory settings and, at the end, set it up as new. Follow these instructions:
Restore your iPhone, iPad, or iPod to factory settings - Apple Support
When done, test your device for a while, without restoring data. If the portrait mode is working fine, your hardware should be okay.
Then restore your data from your previously made backup.
Restore your iPhone, iPad, or iPod touch from a backup - Apple Support
Regards
Giulio