Main Site Documentation

Problem with http request


#1

Hi,

I am using Panda II board and trying repeatedly send some data to website. It works; however, every fourth (or rarely fifth or third) request end up with WebException with message “No free sockets”. I am using slightly modified tutorial. I don’t understand why is the failure so regular - every fourth request failed. Have you any idae please?


#2

Welcome to the forum!

Keep in mind that there are only 4 sockets available. Manage your resources wisely.

Search the forum and “code” section there are some proven implementations that can help you.


#3

I believe the following still holds:

[italic]Normally there are three sockets available. The fourth is kept in reserve for renewing DHCP lease.
[/italic]

There is a method to free the fourth socket for application use.

Make sure you are disposing the object that has the socket when you are finished with it, otherwise there is a delay until garbage collection frees the socket.


#4

Thank you all…

I finaly solved the problem. Accualy it was my fault :slight_smile: I didn’t close the response. Now everything works fine…