I’ve been diagnosing a similar problem recently. The Pi 3’s built in wifi was losing connection every couple of minutes (but coming back up immediately afterwards). It looks like it is going into a power save mode. For me the problems started at the time of 2 changes: a new install of dd-wrt on the wifi router and a raspbian dist-upgrade. I don’t know if one of the two or a combination caused the problem. Here’s what I found, your mileage may vary.
I tried the disabling power saving of the wifi adapter using iw wlan0 set power_save off, but that didn’t change anything. Although iwconfig shows Power Management is off, it still keeps disconnecting every couple of minutes.
The workaround I’ve used during my last ferment is to open a screen session to keep a ping job to my router running. Without the ping running, the pi was reconnecting at least a dozen times an hour. With the job running, the connection has remained stable for the last 10 days. I’ll probably set up a cron job to keep alive the wifi instead of the screen session.