[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] lwIP 0.5.2 under heavy use
From: |
Kieran Mansley |
Subject: |
[lwip-users] Re: [lwip] lwIP 0.5.2 under heavy use |
Date: |
Wed, 08 Jan 2003 23:13:29 -0000 |
On Tue, 12 Mar 2002, James Roth wrote:
> To clarify, this is the message that appears just before failure:
>
> memp_malloc: out of memory in pool 4
>
> Looks like 4 is MEMP_TCP_PCB_LISTEN, my MEMP_NUM_TCP_PCB_LISTEN is 8.
> Why would this run out after thousands of successful, sequential
> connections?
I've not heavily tested it, but I'm not surprised that you see something
like this after a long time, as some parts of the code such as the sockets
interface haven't seen a great deal of action. Also, it's still being
developed so bugs will surface every now and then.
As to how to track it down... For you to run out of memory in the listen
pcb pool, the application must have more than 8 listening sockets. If it
doesn't, it must have opened 8 in total, and there is a bug in the
closing/reclaiming of listening sockets so they don't get freed properly.
I know apache does start up a new process every now and then (to replace
an old one - it does this to ensure any memory leaks are short lived), or
have many processes on the go listening for connections, and it can
increase the number it has in order to meet demand. Perhaps this is why
it is reaching the limit of 8 listening connections. I'd take a look at
tcp_listen, perhaps put some tracing in to see how often it is getting
called and when. This might give a clue as to why it is running out of
this particular resource.
Hope that helps - it's a bit vague, but might give you somewhere to start!
Kieran
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] lwIP 0.5.2 under heavy use, Jani Monoses, 2003/01/08
- [lwip-users] Re: [lwip] lwIP 0.5.2 under heavy use, Leon Woestenberg, 2003/01/08
- [lwip-users] Re: [lwip] lwIP 0.5.2 under heavy use, Paul Sheer, 2003/01/08
- [lwip-users] Re: [lwip] lwIP 0.5.2 under heavy use, James Roth, 2003/01/08
- [lwip-users] Re: [lwip] lwIP 0.5.2 under heavy use, Adam Dunkels, 2003/01/08
- [lwip-users] Re: [lwip] lwIP 0.5.2 under heavy use, Kieran Mansley, 2003/01/08
- [lwip-users] Re: [lwip] lwIP 0.5.2 under heavy use,
Kieran Mansley <=
- [lwip-users] Re: [lwip] lwIP 0.5.2 under heavy use, James Roth, 2003/01/09
- [lwip-users] Re: [lwip] lwIP 0.5.2 under heavy use, James Roth, 2003/01/09