nx_packet_pool_empty_requests count is very high

Hi All,


I am using e2studio and s7g2 board...


I am using NetX duo and during IP communication (Say MODBUS/HTTP) i am experiencing errors/timeouts/latency etc...


upon inspecting the g_ip0 (ip resource) and the packet pool associated to it I find that within minutes for program execution...


nx_packet_pool_empty_requests  has a value of 66487


How can I find out Why this is happening....

  • Is your application releasing packets when it should be (i.e. calling nx_packet_release() after packets have finished being used, or when an error occurs), or it could be that there are just not enough packets in the packet pool associated with the IP instance, so when a TCP packet is received, a packet for the acknowledgment cannot be allocated.
  • In reply to Jeremy:

    Hi Jeremy,

    Thank you for your reply...

    We have taken care of nx_packet_release() [still I will double check] in particular since it is clearly mentioned in the document that it can lead to the aforementioned problem, since its still happening is what puzzles me...
    Is there any way to check when this occurs in the code...

  • In reply to Surojit:

    Hi Surojit-
    Do you have a way of measuring network traffic, say with wireshark or something similar? Perhaps that would give you some additional information on where/when the errors and timeouts start. This might let you zero in on where during execution things have gone wrong.
    Let me know if this makes sense or if I'm off track.
  • In reply to WarrenM:

    Hi All,

    I found the problem, g_ip0 priority was higher (slower) than other application tasks,
    when I changed it the problem disappeared.

    Thank you