Q:

a WD external hard drive keeps connecting and reconnecting randomly

please i'd appreciate an advice regarding the following issue :
i am using Ubuntu 16.04 on a DELL machine that is connected to an external WD hard drive 4TB (Wedter Digital) using a SABRENT docking station.  
The external hard drive keeps connecting and reconnecting randomly, and i can not do any work ... Please would you advise how i shall fix the issue ?  
is there an OS issue or a USB connection issue ?  With DMESG, the message is : 
 dmesg | tail -50
[ 1743.012026] sd 11:0:0:0: [sde] Mode Sense: 67 00 10 08
[ 1743.012388] sd 11:0:0:0: [sde] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 1743.036059] sd 11:0:0:0: [sde] Attached SCSI disk
[ 1743.970166] EXT4-fs (sde): recovery complete
[ 1743.970375] EXT4-fs (sde): mounted filesystem with ordered data mode.  Opts: (null)
[ 1853.292280] usb 2-2: USB disconnect, device number 11
[ 1853.292510] sd 11:0:0:0: [sde] tag#0 uas_zap_pending 0 uas-tag 1 inflight: CMD 
[ 1853.292518] sd 11:0:0:0: [sde] tag#0 CDB: Read(16) 88 00 00 00 00 01 7a 81 61 68 00 00 00 40 00 00
[ 1853.292527] sd 11:0:0:0: [sde] tag#1 uas_zap_pending 0 uas-tag 2 inflight: CMD 
[ 1853.292533] sd 11:0:0:0: [sde] tag#1 CDB: Read(16) 88 00 00 00 00 01 7a 81 61 a8 00 00 00 80 00 00
[ 1853.292539] sd 11:0:0:0: [sde] tag#2 uas_zap_pending 0 uas-tag 3 inflight: CMD 
[ 1853.292544] sd 11:0:0:0: [sde] tag#2 CDB: Write(16) 8a 00 00 00 00 01 7d 45 ff b8 00 00 00 08 00 00
[ 1853.292579] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[ 1853.292584] sd 11:0:0:0: [sde] tag#0 CDB: Read(16) 88 00 00 00 00 01 7a 81 61 68 00 00 00 40 00 00
[ 1853.292589] blk_update_request: I/O error, dev sde, sector 6350266728
[ 1853.292614] sd 11:0:0:0: [sde] tag#1 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[ 1853.292619] sd 11:0:0:0: [sde] tag#1 CDB: Read(16) 88 00 00 00 00 01 7a 81 61 a8 00 00 00 80 00 00
[ 1853.292623] blk_update_request: I/O error, dev sde, sector 6350266792
[ 1853.292635] sd 11:0:0:0: [sde] tag#2 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[ 1853.292640] sd 11:0:0:0: [sde] tag#2 CDB: Write(16) 8a 00 00 00 00 01 7d 45 ff b8 00 00 00 08 00 00
[ 1853.292644] blk_update_request: I/O error, dev sde, sector 6396706744
[ 1853.292704] EXT4-fs (sde): Delayed block allocation failed for inode 199884811 at logical offset 0 with max blocks 1 with error 5
[ 1853.292711] EXT4-fs (sde): This should not happen!!  Data will be lost

[ 1853.292862] Aborting journal on device sde-8. 
[ 1853.292875] JBD2: Error -5 detected when updating journal superblock for sde-8. 
[ 1853.292918] EXT4-fs error (device sde): ext4_journal_check_start:56: Detected aborted journal
[ 1853.292926] EXT4-fs (sde): Remounting filesystem read-only
[ 1853.292931] EXT4-fs (sde): previous I/O error to superblock detected
[ 1853.292961] EXT4-fs (sde): ext4_writepages: jbd2_start: 1024 pages, ino 199884812; err -30
[ 1853.309837] EXT4-fs warning (device sde): ext4_dx_find_entry:1525: inode #194871302: lblock 1: comm pool: error -5 reading directory block
[ 1853.309931] EXT4-fs warning (device sde): ext4_dx_find_entry:1525: inode #194871302: lblock 6: comm pool: error -5 reading directory block
[ 1853.310108] sd 11:0:0:0: [sde] Synchronizing SCSI cache
[ 1853.436169] sd 11:0:0:0: [sde] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 1858.532374] usb 2-2: new SuperSpeed USB device number 12 using xhci_hcd
[ 1858.549351] usb 2-2: New USB device found, idVendor=152d, idProduct=1561
[ 1858.549358] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[ 1858.549364] usb 2-2: Product: SABRENT
[ 1858.549368] usb 2-2: Manufacturer: SABRENT
[ 1858.549372] usb 2-2: SerialNumber: DB98765432232
[ 1858.552345] scsi host12: uas
[ 1858.554204] scsi 12:0:0:0: Direct-Access     SABRENT                   0109 PQ: 0 ANSI: 6
[ 1858.555355] sd 12:0:0:0: Attached scsi generic sg2 type 0
[ 1858.555524] sd 12:0:0:0: [sde] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 1858.556473] sd 12:0:0:0: [sde] Write Protect is off
[ 1858.556481] sd 12:0:0:0: [sde] Mode Sense: 67 00 10 08
[ 1858.556856] sd 12:0:0:0: [sde] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 1858.583994] sd 12:0:0:0: [sde] Attached SCSI disk
[ 1859.542905] EXT4-fs (sde): recovery complete
[ 1859.543087] EXT4-fs (sde): mounted filesystem with ordered data mode.  Opts: (null)

A:

The USB port does not supply enough power for a 4T drive.  You should be using an external AC power adapter for the external drive case or SABRENT docking station, or use a POWERED USB hub. 
The drive may be having a problem reallocating bad blocks.  To do a manual bad block scan...
Note: do NOT abort a bad block scan! 
Note: do NOT bad block a SSD
Note: backup your important files FIRST! 
Note: this will take many hours
Note: you may have a pending HDD failure

sudo e2fsck -fcky /dev/sdXX # read-only test
or
sudo e2fsck -fccky /dev/sdXX # non-destructive read/write test (recommended)
The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table.  Without -k, you loose all of the prior bad block information. 
The -fccky parameter...
   -f     Force checking even if the file system seems clean. 

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a
          read-only  scan  of  the device in order to find any bad blocks. 
          If any bad blocks are found, they are added  to  the  bad  block
          inode  to  prevent them from being allocated to a file or direc‐
          tory.   If this option is specified twice,  then  the  bad  block
          scan will be done using a non-destructive read-write test. 

   -k     When combined with the -c option, any existing bad blocks in the
          bad blocks list are preserved, and any new bad blocks  found  by
          running  badblocks(8)  will  be added to the existing bad blocks
          list. 

   -y     Assume  an answer of `yes' to all questions; allows e2fsck to be
          used non-interactively.   This option may not be specified at the
          same time as the -n or -p options.