MQX RTCS HTTPSRV + Internet Explorer problem

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

MQX RTCS HTTPSRV + Internet Explorer problem

Jump to solution
1,209 Views
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!

Labels (1)
Tags (2)
0 Kudos
1 Solution
751 Views
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

View solution in original post

5 Replies
751 Views
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 Kudos
751 Views
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 Kudos
751 Views
thiagow
Contributor III

The problem was solved using RTCS from Vybrid?

0 Kudos
752 Views
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

751 Views
thiagow
Contributor III

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

0 Kudos