Limit open web page

cancel
Showing results for 
Search instead for 
Did you mean: 

Limit open web page

450 Views
shark
Contributor I

Hi,

 

I has a problem on the webserver. I'm using http dynamic task. Everytime I try to open 5 or more web page for the webserver at the same time, the TCP and http task will out of memory. Is there any where so I can limit how many web page open at the same time so it will not out of memory.

 

 

Labels (1)
Tags (1)
0 Kudos
2 Replies

102 Views
dspNeil
Contributor III

Opening a "page" causes a new dynamic session to be created, assuming that you have the following set in your user_config.h:

#define HTTPDCFG_DYNAMIC_TASKS  1

 

Once the session is complete, that task will be destroyed. The number of concurrent sessions is limited to 2 by default in httpd_confg.h, so unless you have added #define HTTPDCFG_DEF_SES_CNT with a number >2 to your user_config.h, then you are not truly opening 5 "pages" simultaneously, but are only opening at most 2 at a time.

 

Also, there is a memory leak in the http server that I have reported, so until a future release, be very careful about closing and reopening the http server multiple times. Memory is not properly released when you terminate the server.

102 Views
shark
Contributor I

Hi dspNeil,

 

Thank you for the reply. As you said about the memory leak is true. For now I limit my TCP max connection to non-zero (RTCSCFG_TCP_MAX_CONNECTIONS      8 ). This limit the web page open at the same and give error to the web page if open to many rather than out of memory problem. This is my current solution and work for me right now.

 

 Hope in the future they will settle this problem soon

 

 

0 Kudos