External SSD drive fails to respond after some frequent writes I am using a Sandisk SSD.

It has happened a few times already in last two days. After some frequent writes, suddenly I will have trouble accessing the drive. 

In the latest occurance, I did not read from or write to the disk for about 3 hours.

Output from mount

/dev/disk3s1 on /Volumes/ExtremeSSD (apfs, local, nodev, nosuid, journaled, noowners)


More info from Disk utility



Just a FYI, here is the info of my main SSD:



What I can see in the log

default 07:18:36.860460+1000    kernel  disk3: I/O error.
default 07:18:36.860479+1000    kernel  nx_buf_bread:592: buf_biowait() failed, error = 5, b_error = 5, buf_flags_after_io = 0x101, crypto = [unencrypted  ]
default 07:18:36.860487+1000    kernel  _vnode_dev_read:811: *** got err 5 reading blknum 28635 (num read errs: 377524)
default 07:18:36.860502+1000    kernel  apfs_vnop_blockmap:10831: ### obj-id 537613/537613 err 5 offset 0 size 131072 mapflags 2 dstream 2364702/2883584 ###
default 07:18:36.880386+1000    kernel  disk3: I/O error.


If I want to eject the disk, it will take many trials to force eject it, despite I have ensured no application is using the drive.

Here is how I use the drive:

I wrote up a python script which downloads files and write to a directory which is symlinked to a folder on the SSD drive.

At the time of writing this I can see a lot of errors from python like

[Errno 2] No such file or directory: '10000_files/1vVwd9tQQw6DAaRCgtQB.data.FD2A0e73' -&gt; '110000_files/1vVwd9tQQw6DAaRCgtQB.data'


or 

[Errno 5] Input/output error


How can I improve the stability of the drive?
The usb-c cable was faulty. That's why the read/write started to fail after a certain duration of high volume data transfer. 

Once I replaced the usb-c cable that connects the SSD drive to the MBP, and the SSD drive is working as expected.