Ethernet_STM + W5500: maximum parallel connections from same client

Working libraries, libraries being ported and related hardware
stevestrong
Posts: 883
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Ethernet_STM + W5500: maximum parallel connections from same client

Postby stevestrong » Fri Jan 06, 2017 4:52 pm

Well, if it's supposed to be a race condition, than this race condition must be a constant one since it happens by each page refresh 8-)

I don't have an overview what is happening and when the sockets are opened and listened and closed...
You mean that there should be more listening sockets in order to receive more requests?

stevestrong
Posts: 883
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Ethernet_STM + W5500: maximum parallel connections from same client

Postby stevestrong » Fri Jan 06, 2017 6:02 pm

OK, so I added one more image to the HTML page, and this is what Chrome does:
W5500_Chrome_1.jpg
W5500_Chrome_1.jpg (88.46 KiB) Viewed 128 times

The last two images are rejected based on ERR_CONNECTION_REFUSED.

And this is what Firefox does:
W5500_FF_1.jpg
W5500_FF_1.jpg (88.47 KiB) Viewed 128 times


Yes, FF receives all images, one after the other. Here is its log:

Code: Select all

Current date and time: 17-01-06 18:37:02
---> request from: 192.168.100.51
--- Socket status ---
Socket 0 is ESTABLISHED, port: 80, D: 192.168.100.51(60152), RX: 311
Socket 1 is LISTEN, port: 80, D: 192.168.100.1(123), RX: 0
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
GET /web/index.htm HTTP/1.1
Checking request: web/index.htm
...processed in: 264
--- Socket status ---
Socket 0 is ESTABLISHED, port: 80, D: 192.168.100.51(60152), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60153), RX: 304
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
...stopping client...
--- Socket status ---
Socket 0 is CLOSED, port: 80, D: 192.168.100.51(60152), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60153), RX: 304
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
<--- client end.
Current date and time: 17-01-06 18:37:02
---> request from: 192.168.100.51
--- Socket status ---
Socket 0 is LISTEN, port: 80, D: 192.168.100.51(60152), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60153), RX: 304
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
GET /web/img/arrow-up.png HTTP/1.1
Checking request: web/img/arrow-up.png
...processed in: 32
--- Socket status ---
Socket 0 is LISTEN, port: 80, D: 192.168.100.51(60152), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60153), RX: 0
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
...stopping client...
--- Socket status ---
Socket 0 is LISTEN, port: 80, D: 192.168.100.51(60152), RX: 0
Socket 1 is CLOSED, port: 80, D: 192.168.100.51(60153), RX: 0
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
<--- client end.
Current date and time: 17-01-06 18:37:02
---> request from: 192.168.100.51
--- Socket status ---
Socket 0 is ESTABLISHED, port: 80, D: 192.168.100.51(60157), RX: 304
Socket 1 is LISTEN, port: 80, D: 192.168.100.51(60153), RX: 0
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
GET /web/img/backgrnd.png HTTP/1.1
Checking request: web/img/backgrnd.png
...processed in: 590
--- Socket status ---
Socket 0 is ESTABLISHED, port: 80, D: 192.168.100.51(60157), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60154), RX: 303
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
...stopping client...
--- Socket status ---
Socket 0 is CLOSED, port: 80, D: 192.168.100.51(60157), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60154), RX: 303
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
<--- client end.
Current date and time: 17-01-06 18:37:03
---> request from: 192.168.100.51
--- Socket status ---
Socket 0 is LISTEN, port: 80, D: 192.168.100.51(60157), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60154), RX: 303
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
GET /web/img/pump-on.png HTTP/1.1
Checking request: web/img/pump-on.png
...processed in: 35
--- Socket status ---
Socket 0 is LISTEN, port: 80, D: 192.168.100.51(60157), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60154), RX: 0
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
...stopping client...
--- Socket status ---
Socket 0 is LISTEN, port: 80, D: 192.168.100.51(60157), RX: 0
Socket 1 is CLOSED, port: 80, D: 192.168.100.51(60154), RX: 0
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
<--- client end.
Current date and time: 17-01-06 18:37:03
---> request from: 192.168.100.51
--- Socket status ---
Socket 0 is ESTABLISHED, port: 80, D: 192.168.100.51(60156), RX: 298
Socket 1 is LISTEN, port: 80, D: 192.168.100.51(60154), RX: 0
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
GET /web/img/ww.png HTTP/1.1
Checking request: web/img/ww.png
...processed in: 26
--- Socket status ---
Socket 0 is ESTABLISHED, port: 80, D: 192.168.100.51(60156), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60161), RX: 304
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
...stopping client...
--- Socket status ---
Socket 0 is CLOSED, port: 80, D: 192.168.100.51(60156), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60161), RX: 304
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
<--- client end.
Current date and time: 17-01-06 18:37:03
---> request from: 192.168.100.51
--- Socket status ---
Socket 0 is LISTEN, port: 80, D: 192.168.100.51(60156), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60161), RX: 304
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
GET /web/img/compress.png HTTP/1.1
Checking request: web/img/compress.png
...processed in: 37
--- Socket status ---
Socket 0 is LISTEN, port: 80, D: 192.168.100.51(60156), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60161), RX: 0
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
...stopping client...
--- Socket status ---
Socket 0 is LISTEN, port: 80, D: 192.168.100.51(60156), RX: 0
Socket 1 is CLOSED, port: 80, D: 192.168.100.51(60161), RX: 0
Socket 2 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
Socket 3 is CLOSED, port: 0, D: 0.0.0.0(0), RX: 0
<--- client end.
Current date and time: 17-01-06 18:37:04
---> request from: 192.168.100.51
--- Socket status ---
Socket 0 is ESTABLISHED, port: 80, D: 192.168.100.51(60158), RX: 309
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60162), RX: 309
Socket 2 is ESTABLISHED, port: 80, D: 192.168.100.51(60160), RX: 0
Socket 3 is LISTEN, port: 80, D: 0.0.0.0(0), RX: 0
GET /favicon.ico HTTP/1.1
Checking request: favicon.ico
...processed in: 8
--- Socket status ---
Socket 0 is ESTABLISHED, port: 80, D: 192.168.100.51(60158), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60162), RX: 309
Socket 2 is ESTABLISHED, port: 80, D: 192.168.100.51(60160), RX: 0
Socket 3 is LISTEN, port: 80, D: 0.0.0.0(0), RX: 0
...stopping client...
--- Socket status ---
Socket 0 is CLOSED, port: 80, D: 192.168.100.51(60158), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60162), RX: 309
Socket 2 is ESTABLISHED, port: 80, D: 192.168.100.51(60160), RX: 0
Socket 3 is LISTEN, port: 80, D: 0.0.0.0(0), RX: 0
<--- client end.
Current date and time: 17-01-06 18:37:04
---> request from: 192.168.100.51
--- Socket status ---
Socket 0 is CLOSED, port: 80, D: 192.168.100.51(60158), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60162), RX: 309
Socket 2 is ESTABLISHED, port: 80, D: 192.168.100.51(60160), RX: 0
Socket 3 is LISTEN, port: 80, D: 0.0.0.0(0), RX: 0
GET /favicon.ico HTTP/1.1
Checking request: favicon.ico
...processed in: 7
--- Socket status ---
Socket 0 is CLOSED, port: 80, D: 192.168.100.51(60158), RX: 0
Socket 1 is ESTABLISHED, port: 80, D: 192.168.100.51(60162), RX: 0
Socket 2 is ESTABLISHED, port: 80, D: 192.168.100.51(60160), RX: 0
Socket 3 is LISTEN, port: 80, D: 0.0.0.0(0), RX: 0
...stopping client...
--- Socket status ---
Socket 0 is CLOSED, port: 80, D: 192.168.100.51(60158), RX: 0
Socket 1 is CLOSED, port: 80, D: 192.168.100.51(60162), RX: 0
Socket 2 is ESTABLISHED, port: 80, D: 192.168.100.51(60160), RX: 0
Socket 3 is LISTEN, port: 80, D: 0.0.0.0(0), RX: 0
<--- client end.

In this case further sockets are involved.
Not just it receives all images, but in addition requests also "favicon.ico" [which in my case does not exists].

So it seems that Chrome drives the W5500 to its limit.

I just conclude that W5500 is not capable to handle more than 4 simultaneous connection requests at a time.
In the future I will just stick to Firefox :mrgreen:

User avatar
RogerClark
Posts: 5470
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Ethernet_STM + W5500: maximum parallel connections from same client

Postby RogerClark » Fri Jan 06, 2017 8:22 pm

I think you validated my post ;-)


Return to “Libraries & Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest