

Increasing the stack heap (setStackHeap) seemed to help make it run longer but i havent been able to get it to run longer than 12 hours thus far. Putting in debug lines, i traced it down to this function where it appears to be hanging in int EthernetClient::available() from Native Ethernet. Goal is to be able to record for ten days, in the mean time I have added a watchdog timer to hopefully kick the teensy if it fails but I am afraid of this method and want to know why the thing is crashing.

Some times it runs for 20 minutes before crashing, others 5+ hours. Running tcpdump on the pi, the teensy sent a fin ack (screenshots attached) where it should of sent a SYN. I think i have a memory leak somewhere because after 20 minutes or so the teensy just hangs on uploading the file (specially always after the PASV portion of FTP). Check the CPU usage of the FTP server and client for any strange behaviour.I am working on a project where i have a teensy 4.1 recording audio and then uploading to an ftp server on a Raspberry Pi.If there's a memory leak something may be swapping and slowing everything down. Check the memory usage of the FTP server and client using top.connecting to an FTP server on the client)? Do you get different behaviour when initiating the transfer from the client side vs the server side (i.e.If a transfer has slowed down, what happens if you disconnect and then resume the transfer? Is it slow straight away, or does it go fast again before slowing down?.If any of the above tests show problems, you should have a clue about where to look next. Client disk: May not need to test this given that you can FTP successfully to other servers from this client.Server disk: On the server, use dd to read from /dev/zero and write to a local file on the target filesystem.If you do, make sure that all the hosts and network devices support jumbo frames and that you aren't filtering ICMP packets anywhere (ICMP packets are used for MTU path discovery). MTU: If you're using 10GbE, you may have jumbo frames enabled (that is, MTU size greater than 1500).Monitor throughput with cat /proc/net/dev. Network load testing: Use a throughput testing tool such as iperf with a long test time to see if you can reproduce the issue.


Before zeroing in on the FTP aspect, you should perform some synthetic tests to rule out other causes.
