When uploading app on the TestFlight. The error showing There was an error sending data to the iTunes store "scheduling restart shortly".
Also, it's not uploading with App Loader.

When uploading app on the TestFlight. The error showing There was an error sending data to the iTunes store "scheduling restart shortly".
Also, it's not uploading with App Loader.

Wait for while it automatically restarts this process and your app is uploaded.
I faced the same issue. I just wait in the same window.
Doesn't it means that there is a scheduled maintenance for iTunes Connect and that you should just try again later?
Faced this issue several times and many a time it was resolved automatically upon auto restart from the Xcode itself as they mentioned in the message scheduling restart shortly.
However, if the issue still persists there might be an issue with your internet connection, in my case issue was with the firewall and upon changing the firewall it was resolved. In such cases using your mobile data will help upload the build.
Had this many times over the years. Latest fix for me is to reboot the Mac, and also ensuring you are on are on a Mobile network (as pointed out by Max Niagolov) and not any Coorporate Wifi. Have been using Mobile Network for past 6 years in various companies as Coorp Wifi never works.
In my case I've encountered with this issue two times. First time I solved it by using Application Loader and it successfully uploaded. And then when I was needed to upload another version of the same app this issue appeared again and after I few unsuccessful attempts to upload it. I switched my network to mobile phone from wifi and finally uploaded the build.
Had this issue for 2-3 mins, it resolved automatically and started uploading process. Do not need to cancel or restart mac in my case.