When a hard disk hits a sector it can’t read, it keeps trying for a while before it gives up and reports the error. In a RAID set, a disk that stays silent too long can get kicked out while it’s still busy retrying. The setting that limits those retries has a different name at every maker: TLER at Western Digital, CCTL at Samsung and Hitachi/HGST, ERC at Seagate. smartctl calls it SCT Error Recovery Control.
To see what a drive is set to:
sudo smartctl -l scterc /dev/sda
You get a read and a write value, in deciseconds, so 70 means 7 seconds. If the drive doesn’t support SCT ERC, smartctl tells you so. To set a limit for both reads and writes:
sudo smartctl -l scterc,70,70 /dev/sda
The man page calls 70,70 the typical value for RAID configurations. A value of 0 disables the limit, and values below 65 are probably not supported.
Persistence is the catch. The man page only promises that the values survive a power-on reset with the ,p variant, -l scterc,70,70,p, and that needs a drive with ATA ACS-4 or newer. On older drives, assume the setting is gone after a power cycle and run the command at every boot; on Unraid that would be a line in /boot/config/go. It’s an ATA-only feature, so it does nothing for NVMe. My advice is to change it only for disks in a real RAID set. A lone disk holding the only copy of your data is better off trying a bit longer.
Further reading: smartctl man page (smartmontools)