This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Http over PPP problem

Hi forum users,
A few days ago I started struggling with the following problem. When opening three or more concurrent http sessions over a PPP interface my application crashes and the debugger tells me it always happens with the top of the call stack beeing in ppp_send() or ppp_receive() functions.

It seems both those functions fail when trying to allocate some memory by calling alloc_mem().
Suspecting this could have been caused by unproper resources allocation for the whole TcpNet stuff, I tryed raising the memory pool size in NetConfig.c but with no luck. Is such memory really allocated from the TcpNet memory pool or am I on the wrong way?

One more bit. No such effect is visible using concurrent modbus sessions on the same TCP / PPP stack (enabling every available modbus communications however reduces the number of concurrent http sessions I can trigger without crashing). I realize http involves more resources and I still suspect an incorrect sizing for memory. It also seems there is some relationship with the size of the file being transferred by http. Bigger files make the thing crash even with less concurrent http sessions.

A couple questions arise. Can anyone suggest a reasonable rule-of-thumb for choosing a 'safe' memory pool size? I'm using a total of 10 sockets, with max 5 http sessions. No application level protocol is enabled other then http.

And then... is an error allocating memory at the sending/receiving stage of the PPP layer supposed to be a critical error? Could this otherwise be handled by discarding the packet the way we do at MAC level? This is more a confirmation request than a true question, since I suspect some reliability is assumed at that level of the stack.

TIA
Regards,
Andrea

0