- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running an HTTPS server (the one under libraries/daemons/HTTP_Server) and after a while of connecting via various devices, I can get it to stop responding to incoming packets. http_server_event_thread_main() waits indefinitely:
result = wiced_rtos_pop_from_queue( &server->event_queue, ¤t_event, WICED_NEVER_TIMEOUT );
However, when I manually call the following, it recovers:
wiced_tcp_server_stop(...);
wiced_tcp_server_start(...);
So, the TCP server appears to stop responding for some reason.
Any ideas on what could be responsible for chopping the TCP server off at its knees?
Thanks!
Solved! Go to Solution.
- Labels:
-
ispn:38946:1:0
-
l1:314:1:0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I restart the server, the log says "No free socket found. Looks like all the sockets are currently in use". It appears that, over time, all sockets on the server get used up and are not freed. If I replace WICED_NEVER_TIMEOUT with a specific time period, and add the following in http_server_event_thread_main(), the streams are disconnected and sockets are re-initialized:
wiced_http_disconnect_all_response_stream(server);
The server appears to carry on after that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I restart the server, the log says "No free socket found. Looks like all the sockets are currently in use". It appears that, over time, all sockets on the server get used up and are not freed. If I replace WICED_NEVER_TIMEOUT with a specific time period, and add the following in http_server_event_thread_main(), the streams are disconnected and sockets are re-initialized:
wiced_http_disconnect_all_response_stream(server);
The server appears to carry on after that.