WRT1900AC reboots when xferring files to HDD

Hello everyone,

I've been using OpenWRT on my WRT1900AC v1 for a while now and I love it. A few days ago, I decided to attach a 4TB HDD to the router to use it as a NAS. However, whenever I try to transfer a large file to it (20GB+), the router reboots by itself halfway through the transfer. I was thinking that it might be caused by not having enough RAM 256MB), so I added a SWAP drive, but the problem persists. Anyone has an idea on how to fix this issue?

Thank you.

You really need to provide more relevant information

OS? Have you tried snapshots?
SFTP, rsync, Samba, NFS etc?
eSATA, USB?
Self powered of powered by eSATA(p)/USB?
Filesystem? FUSE?

Sorry about that.
The OS is the latest version (18.06.1).
I haven't tried snapshots.
-Netatalk AFP (I'm also using the NAS as a time machine for backing up my MacBook Pro (Mid-2015, 1TB WD Black (2018) NVMe SSD))
-HDD is Seagate Backup Plus 4TB (USB 3.0, self-powered)
-Filesystem is ext4 (GPT)

USB-powered, spinning-platter drive connected via USB?

I'd put my money on not enough power being supplied under load, the voltage dropping, and the router rebooting when the voltage recovers. If so, a powered hub may resolve it for you.

A quick check of that model name on https://www.seagate.com/consumer/backup/backup-plus/ suggests that it draws more power than USB 2.0 can provide.

1 Like

I will try with a powered hub. I'm using the USB 3.0 port on the WRT1900AC though.

It's either power or the router is running out of RAM. If it's the latter, you need to create a swap partition on external storage media, then mount that partition as swap memory.

1 Like

try running this at system startup:
#keep a bit more free memory to increase stabilty:
echo 32768 >/proc/sys/vm/min_free_kbytes

depending on the Openwrt build you are using, it might be the OS uses so much memory for caching that the wifi driver can run out of memory and crash the kernel. Above change keeps a more healty limit, and keeps things stable under load.

1 Like

Definitely worth a try. The only solution I can recall working from when this was experienced in the old OpenWrt forum's WRT1900AC thread was to create a swap partition.

I tried johnnysl's solution, and it works well, thank you :slight_smile:

My swap partition is also set up on a thumb drive but it is not being used, even when there's only 10% free memory left... why?

Edit: I tried increasing the swappiness to higher values (like 90 and even 100), but the swap partition is still not being used.

          total       used       free     shared    buffers     cached
 Mem:    252032     229420      22612      18980       6804     164256
 -/+:                58360     193672
Swap:  15632360          0   15632360

It's been a few years, but I believe there were HW Buffer patches that someone came up with around that point in time, which I believe were to address the RAM issue and Swap usage, but I could also very well be mis-remembering and the HW Buffer patch may have been for something else.

  • If it was to address the RAM and Swap usage, it'd shoot @davidc502 a PM and see if he remembers what specifically that patch applied to and whether it was ever implemented upstream for the WRT AC Series (I can't recall the exact user who came up with the patch).

  • Again, if I'm remembering right, the Swap partition should be being utilized if the file transfers include files >~240MB... then again, I could be mis-remembering and correlating two separate issues
1 Like