HTTPSRV unresponsive

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HTTPSRV unresponsive

Jump to solution
1,285 Views
tomaszk
Contributor II

Hi, I've spotted a strange problem with the MQX4.1 web server. After a few hours of working it becomes unresponsive and I can't log into.

It's very random behavior and sometimes server dies after few days, sometimes more frequent.

Restarting the HTTPSRV by using HTTSRV_release() and HTTPSRV_init() is not solving the problem.

I've noticed that every incoming TCP packet has been dropped because the CONN_COUNT>=RTCSCFG_TCP_MAX_CONNECTIONS.

CaptureRTCS.JPG.jpg

Because of the memory usage the  RTCSCFG_TCP_MAX_CONNECTIONS = 2 in my case.

I don't understand why the CONN_COUNT =2. It looks like the RTCS is not releasing the connections properly.

After some tests I can say that the crash happens whenever two clients trying to connect to the server at the same time.

There are few similar problems posted by forum's members but non of the proposed solutions works in this case.

(My setup: MQX4.1, BSP: twrmcf52259).

Any help will be highly appreciated

Regards,

Message was edited by: Tomasz Kulinski

Labels (1)
Tags (2)
1 Solution
911 Views
RadekS
NXP Employee
NXP Employee

Unfortunately it is hard to say what could be reason for that behavior. Since using HTTSRV_release() and HTTPSRV_init() is not solving the problem, problem will be probably somewhere deeper and limited number of TCP connections is probably just side effect.

Because it's very random behavior it could happened that we lost some connection end packet…

It is also possible that this source of this issue was already fixed.

As first I would like to recommend test it on MQX 4.1.1.

Latest released RTCS could be used from MQX4.1.2 for Vybrid or from KSDK1.1.0.

https://freescale.flexnetoperations.com/control/frse/download?element=6003621

https://freescale.flexnetoperations.com/control/frse/download?element=6011601

Could you please test it with some newer RTCS code?

BTW: There is also MQX 4.1.0.1 patch which contains several important RTCS bug fixes. Did you install it?

I hope it helps you.


Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

3 Replies
912 Views
RadekS
NXP Employee
NXP Employee

Unfortunately it is hard to say what could be reason for that behavior. Since using HTTSRV_release() and HTTPSRV_init() is not solving the problem, problem will be probably somewhere deeper and limited number of TCP connections is probably just side effect.

Because it's very random behavior it could happened that we lost some connection end packet…

It is also possible that this source of this issue was already fixed.

As first I would like to recommend test it on MQX 4.1.1.

Latest released RTCS could be used from MQX4.1.2 for Vybrid or from KSDK1.1.0.

https://freescale.flexnetoperations.com/control/frse/download?element=6003621

https://freescale.flexnetoperations.com/control/frse/download?element=6011601

Could you please test it with some newer RTCS code?

BTW: There is also MQX 4.1.0.1 patch which contains several important RTCS bug fixes. Did you install it?

I hope it helps you.


Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

911 Views
tomaszk
Contributor II

Thanks Radek,

Your solution works! I have tested the MQX 4.1.1 + RTCS 4.1.2 for Vybrid and the web server is rock solid now. This is the http server I've been waiting for a long time (since MQX3.6) :smileyhappy:. Good job.


Unfortunately, the size of the new RTCS 4.1.2 is bigger than 4.1.1 and I can't use it because my code exceeds the internal memory size for my micro now .

Is there any way to shrink the new RTCS  by removing some components i.e.  websockets?


Best regards,

0 Kudos
Reply
911 Views
RadekS
NXP Employee
NXP Employee

I am glad that it works.

By internal memory you mean Flash or RAM?

If you will comment out websocket code, you can save some flash.

If you need save some RAM, you can tune stacksizes for your case (MCU and toolchain). You can also decrease session buffer size and socket buffer size, but it influences throughput – it will be slower.

You can disable components/protocols which you don’t use by macros. E.g ICMP, DHCP, UDP,…

Note: DHCP depends on UDP.

0 Kudos
Reply