I encountered the same issue as others in this thread regarding running TrueNAS-SCALE-24.04.2 with NFS shares. After some time, both the NFS clients and the NFS server would hang, and I noticed the nfsd hung_task_timeout_secs message in the kernel.log/syslog/dmesg.
With TrueNAS, ARC is configured to use all available memory by default. You can check the current values by running sudo arc_summary in the shell. I adjusted the zfs_arc_max value to 75-85% of my total available memory, and since making this change, I haven’t experienced the issue again—it’s been 33 days without any crashes.
To set the zfs_arc_max, go to System Settings => Advanced => Init/Shutdown Scripts => Add.
Type: Command
Command: echo 51539607552 >> /sys/module/zfs/parameters/zfs_arc_max
When: Post Init
Enabled: Check mark
1GB = 1024 x 1024 x 1024 = 1073741824
48GB = 48 x 1GB = 51539607552