Ethernet stops working after 3 hours

I am using the S7G2 controller runs without problem till 3 hours after that Ethernet stops working.

I have checked the packet pool in 1 min frequency by the function nx_packet_pool_info_get ()

status = nx_packet_pool_info_get (&g_packet_pool0, &total_packets, &free_packets, &empty_pool_requests,
                                                  &empty_pool_suspensions, &invalid_packet_releases);

on the below conditions i am trying to obtained the logs and this logs will starts after 3 hours

if (!g_packet_pool0.nx_packet_pool_available || invalid_packet_releases || empty_pool_requests
                        || empty_pool_suspensions)

total_packets free_packets empty_pool_requests empty_pool_suspensions invalid_packet_releases
200 2 6 1 0
200 0 585 2 0
200 0 1352 2 0
200 0 2076 2 0
200 0 2864 2 0
200 0 3638 2 0
200 0 4415 2 0

how to find where the packets been getting filled and is there a way to release directly 

how to over come this.

Parents
  • Hi Amar,

    It appears that you are depleting the packet pool because there is a leak in the packet pool and packets are not being returned to the pool after they are used.  Please check you code and insure that packets are returned to the pool in all execution paths including all error handling and other scenarios.

    -Gary 

  • Hi garyj,

    I had taken care of the proper release of the packet on the receiving  success release and sending fail release. in all

    nx_packet_allocate,nx_packet_data_append,nx_tcp_socket_send,nx_tcp_socket_receive,nx_icmp_ping

  • If that were true, you wouldn't run out of packets, right? This seems easy enough to debug - add some global counters that increment and decrement when packets are used/returned, and halt the processor periodically and take a peek at them.  

    Other that that, you're going to have to explain a bit more about what this application does with all these ethernet packets.

    good luck

    Larry

Reply
  • If that were true, you wouldn't run out of packets, right? This seems easy enough to debug - add some global counters that increment and decrement when packets are used/returned, and halt the processor periodically and take a peek at them.  

    Other that that, you're going to have to explain a bit more about what this application does with all these ethernet packets.

    good luck

    Larry

Children