I have had the exact same issue. Xfinity's internet stability has been garbage the last couple weeks. Just drops out, stays out for 30 mins or so, then suddenly it's back.
Is this with a WiFi connection ? If so, for a test, does a computer / device hardwired directly to the router / gateway device with an ethernet cable have the same problem ?
With this test, we are trying to isolate this from being either a WiFi-only problem or a problem with the general connection to the Comcast system which would of course affect both. It's a good first step of troubleshooting before we proceed any further.