I'm using 2.0.3 without an RTOS for receiving streaming audio at 128kbits/s in this example. lwIP is 192.168.0.200, and it's initiating the connection. Things are ok for several seconds or tens of seconds at a time then there will be duplicate ACKs and/or re-transmissions. The eventual consequence is the server sending this stream to lwIP gracefully disconnects with a FIN. That's not shown in the attached trace as this may take 10 minutes or more.
If you look at the "capture" file, you'll see that each time there's a re-transmission, lwIP ACKed that packed just moments before. Also, this seems to occur right before or around zero window announcements. I thought maybe the issue was the TCP_WND was too high compared with the amount of PBUF space available, so I cut down on TCP_WND but that didn't help.
I'm not seeing anything of note on the debug output. It should be noted I'm capturing this by connecting my computer (for Wireshark), the lwIP board, and the link to my router with a 10Mb hub so I can do the capture. However the same eventual disconnection occurs even when everything is connected to a switch, hence the reason for my investigation.
For what it's worth, this is running on a PIC32MZ and the load isn't very high so the ETH interrupt gets serviced very quickly.
I've also attached "dupack" which shows duplicate ACKs, but this doesn't seem to occur as often as the re-transmissions.
#define NO_SYS 1
#define MEM_ALIGNMENT 4
#define MEM_SIZE 16384
#define MEMP_NUM_PBUF 32
#define MEMP_NUM_RAW_PCB 4
#define MEMP_NUM_UDP_PCB 4
#define MEMP_NUM_TCP_PCB_LISTEN 4
#define MEMP_NUM_REASSDATA 10
#define MEMP_NUM_IGMP_GROUP 1
#define PBUF_POOL_SIZE 80
#define TCP_WND (TCP_MSS*10)
#define TCP_MAXRTX 5
#define TCP_MSS 1460
#define TCP_SND_BUF (TCP_MSS*30) //the number of pbufs allowed to be used for outgoing. important for webpage
#define TCP_SND_QUEUELEN 80
#define PBUF_POOL_BUFSIZE 512