MQX RTCS HTTPSRV + Internet Explorer problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MQX RTCS HTTPSRV + Internet Explorer problem

ソリューションへジャンプ
1,524件の閲覧回数
lfschrickte
Contributor IV

Hi,

I have an application using httpsrv which runs well when accessed by Firefox and Chrome, however it gets 20 seconds to 1 minute lag (always multiples of 20 s - the socket timeout time) on "some" HTTP requests by Internet Explorer 11. As it is hard to convince the end user to adopt the browser of our choice, I'm trying to make it work with IE.

The facts:

1. The problem happens if the page includes other files - in my case .js and .css files

2. The lag is due to the 20s session timeout - I have a max_ses of 2 (it doesn't matter how many I have, it crashes anyway) and when I stop the debugger during the problem both session tasks are stopped on "msg send"

3. Debugging it step by step I could find that both sessions are stuck trying to read data, and the recv function keeps returning TCP TIMEOUT error. It looks like the device is never receiving the GET request

4. IE requests lots of socket at once on connection beginning, and it looks like this is in some way interfering on httpsrv behavior. Wireshark shows the problem clearly:

2015-03-02 17_17_57-ieproblem1.pcapng   [Wireshark 1.12.3  (v1.12.3-0-gbb3e9a0 from master-1.12)].png

Observing the red flow, it can be seen that the GET was issued on time 0.001, this packet was ACKed by the device on 0.011 - however the data starts being transferred only on 40.06! This happens after 4 other sockets are aborted (ports 52138, 52139, 52140, 52141). After 40s everything works...

This is the page which I use to simulate the problem - it doesn't matter that the CSSs and JSs doesn't exist in the directory:

test3.html

<!DOCTYPE html>

<html lang="en">

  <head>

  <meta charset="utf-8">

  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <meta name="viewport" content="width=device-width, initial-scale=1">

  <meta name="description" content="">

  <meta name="author" content="">

  <title>TEST3</title>

  <link href="xx.css" rel="stylesheet">

  </head>

  <body>

  <h1> TEST PAGE </h1>

  <script src="yy.js"></script>

  <script src="zz.js"></script>

  </body>

</html>

I've seen a similar bug on an old MQX installation reported in this thread: Re: Can't open HTTPSRV web pages. Explorer keeps in waiting

However I've found that the suggestions in this task were already adopted on the MQX installation I'm using.

I'm using Kinetis SDK RTCS (MQX_KSDK_1.0.0) and MQX 4.1.1 (I've ported RTCS from KSDK to MQX 4.1.1 to get Websocket functions - however the changes I've done are minimal - I doubt there is any influence).

Thanks very much, I appreciate any help!

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
1,066件の閲覧回数
lfschrickte
Contributor IV

Thiago, please check the answer I've provided here:

Re: MQX 4 - HTTPSRV : sockets stay opened

Copying the important part:

I've fixed this issue by setting max sessions parameter (params.max_ses) to 6 on httpd - because IE can open 6 connections at once and the HTTP server must be ready to answer on any of them (IE opens 6 sockets but doesn't make requisitions on all of them - so if you have, for instance, max sessions set to 2 and on a request IE decides to make the first request on any of the other 4 connections you are in trouble).

IMPORTANT:

The RTCS max sockets, PCB connections should be set accordingly! You should have enough memory as well!

Regards

元の投稿で解決策を見る

5 返答(返信)
1,066件の閲覧回数
karelm_
Contributor IV

Hi Luiz,

Please try to use RTCS from MQX 4.1.2. I know that it is mentioned as Vybrid only release, but RTCS code is not platform dependent and there are more bugfixes and websocket functionality too.

Best regards,

Karel

0 件の賞賛
返信
1,066件の閲覧回数
thiagow
Contributor III

I have the same problem using MQX 4.1.1, however sometimes the page don't load CSS, PNG and other files. The problem occours after several hours powered on.

0 件の賞賛
返信
1,066件の閲覧回数
thiagow
Contributor III

The problem was solved using RTCS from Vybrid?

0 件の賞賛
返信
1,067件の閲覧回数
lfschrickte
Contributor IV

Thiago, please check the answer I've provided here:

Re: MQX 4 - HTTPSRV : sockets stay opened

Copying the important part:

I've fixed this issue by setting max sessions parameter (params.max_ses) to 6 on httpd - because IE can open 6 connections at once and the HTTP server must be ready to answer on any of them (IE opens 6 sockets but doesn't make requisitions on all of them - so if you have, for instance, max sessions set to 2 and on a request IE decides to make the first request on any of the other 4 connections you are in trouble).

IMPORTANT:

The RTCS max sockets, PCB connections should be set accordingly! You should have enough memory as well!

Regards

1,066件の閲覧回数
thiagow
Contributor III

Thanks, it looks that increasing max sessions paramters to 6 decrease the times that the problem occours.

0 件の賞賛
返信