Slow first image download - Device loses connectivity

Device: RPi Zero W with a USB network adapter connected to a USB hub.
Resin OS 2.12.7+rev1production
Supervisor 7.4.3

When deploying a new device, the download of the first commit is extremely slow.
It progresses to a certain point (around 40%), then the device disconnects from the dashboard, requiring a power cycle to restore communications.

Did tried to disable delta updates, to no avail. There are no problems with the local network. Nothing on the log besides “downloading image” (no errors, etc).
I was able to deploy this application before, to other devices.

Can anyone weight in?

Thanks!

This sounds like an unstable network connection. Are you able to reproduce this on a development image as well?

Actually, I think I’ve found the culprit:
Removing the USB hub and connecting the USB NIC directly to the Pi resolved the issue.
But the USB hub is working fine on other computers, so it’s probably a driver issue.

After the first deployment finished I was able to use the USB hub again.
My image updates the RPi firmware, so that may - or may not - have helped.

I did stumbled upon these entries on DMESG:
[ 1460.551460] usb 1-1.1: USB disconnect, device number 19
[ 1460.665734] usb 1-1.1: new full-speed USB device number 20 using dwc_otg
[ 1460.765700] usb 1-1.1: device descriptor read/64, error -32
[ 1460.985720] usb 1-1.1: device descriptor read/64, error -32
[ 1461.205776] usb 1-1.1: new full-speed USB device number 21 using dwc_otg
[ 1461.305735] usb 1-1.1: device descriptor read/64, error -32
[ 1461.525769] usb 1-1.1: device descriptor read/64, error -32
[ 1461.746624] usb 1-1.1: new full-speed USB device number 22 using dwc_otg
[ 1462.185748] usb 1-1.1: device not accepting address 22, error -32
[ 1462.285750] usb 1-1.1: new full-speed USB device number 23 using dwc_otg
[ 1462.725756] usb 1-1.1: device not accepting address 23, error -32
[ 1462.726172] usb 1-1-port1: unable to enumerate USB device
[ 1465.875836] usb 1-1.1: new high-speed USB device number 24 using dwc_otg
[ 1466.217789] usb 1-1.1: New USB device found, idVendor=046d, idProduct=0825
[ 1466.217818] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=2
[ 1466.217830] usb 1-1.1: SerialNumber: XXXXXXXX

Do you have any other reports of driver issues regarding USB hubs? Is there something that can be done to make sure these run reliably?

Thanks!

Is it a powered USB hub? Or is it getting power from the PiZero only? The unreliability can be due to insufficient power if it’s not a powered hub. Just some hunches for further debugging…

Hi,
I met this issue before. My solution is to set up a proxy to download. The step is as below.

  1. mkdir -p ~/.docker
  2. touch config.json
  3. sudo vim config.json

The content of config.json is as below:

{      
 "proxies":
 {
   "default":
   {
     "httpProxy": "your_proxy_address:your_proxy_addess_port"
   }
 }
} 

You are able to google how to setup docker proxy via this reference.

There are many proxy lists. Just google it.