I’m having an issue in the field with what I am suspect is network buffer exhaustion, or some type of buffer leak. It takes about a week for this to show up. Symptoms are slower and slower network until complete loss of network happens. FreeRTOS_SendPingRequest fails, I’m thinking because of inability to obtain a buffer. The only thing that fixes the connection is a device reboot.
+TCP version is V2.3.3.
I’m using standard FreeRTOS V10.2.1, not the HAL version.
The device is a STM32F769NIH using the standard NetworkInterface and BufferAllocation_1
Some questions then…
- Does closing a socket always release all pending i/o buffers?
- Does the HTTP server always reserve 8(or some other defined value) buffers, or why would FreeRTOS_netstat always show 8 buffers in use regardless?
Here are some settings for review, do these look ok?
#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ( 25 )
#define ipconfigUSE_DHCP 1
#define ipconfigDHCP_REGISTER_HOSTNAME 1
#define ipconfigDHCP_USES_UNICAST 1
#define ipconfigUSE_DHCP_HOOK 1
#define ipconfigTCP_WIN_SEG_COUNT 256
#define ipconfigTCP_RX_BUFFER_LENGTH ( 4 * 1460 )
#define ipconfigTCP_TX_BUFFER_LENGTH ( 2 * 1460 )
#define ipconfigTCP_KEEP_ALIVE ( 1 )
#define ipconfigTCP_KEEP_ALIVE_INTERVAL ( 20 )
#define ipconfigFTP_TX_BUFSIZE ( 4 * ipconfigTCP_MSS )
#define ipconfigFTP_TX_WINSIZE ( 2 )
#define ipconfigFTP_RX_BUFSIZE ( 8 * ipconfigTCP_MSS )
#define ipconfigFTP_RX_WINSIZE ( 4 )
#define ipconfigHTTP_TX_BUFSIZE ( 3 * ipconfigTCP_MSS )
#define ipconfigHTTP_TX_WINSIZE ( 2 )
#define ipconfigHTTP_RX_BUFSIZE ( 4 * ipconfigTCP_MSS )
#define ipconfigHTTP_RX_WINSIZE ( 4 )