Page 1 of 1
httpd_uri: httpd_register_uri_handler: no slots left for registering handler
Posted: Wed Oct 09, 2019 3:09 pm
by zliudr
Hi, I kept getting "httpd_uri: httpd_register_uri_handler: no slots left for registering handler" even for the first handler I thought I registered. There must be some registration I didn't know about.
Is there any way to find out what's been registered by calling a function?
Can someone point to the library code that handles this so I can add or turn on debug info?
Thanks.
Re: httpd_uri: httpd_register_uri_handler: no slots left for registering handler
Posted: Mon Apr 06, 2020 3:12 pm
by Calebe94
Hello friend.
Did you found any solution to this problem? I'm having the same problem in my project, if I find some solution I'll share with you guys!
Re: httpd_uri: httpd_register_uri_handler: no slots left for registering handler
Posted: Tue Apr 07, 2020 3:37 am
by zliudr
I'm sorry. I think my project changed direction and I didn't continue on the httpd route. I looked up what I wrote down and nothing.
Re: httpd_uri: httpd_register_uri_handler: no slots left for registering handler
Posted: Tue Apr 07, 2020 5:51 pm
by Calebe94
Hello my friend,
I've just solved the problem by specifying the max_uri_handlers on my init_webservice function.
The solution can be seeing below:
Code: Select all
esp_err_t init_webservice(char * base_path, httpd_handle_t * auxserver, rest_server_context_t * auxrest_context)
{
...
httpd_handle_t server = NULL;
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
config.max_uri_handlers = 10;
config.uri_match_fn = httpd_uri_match_wildcard;
...
init_routes(server, rest_context);
}
My current project is using 10 routes right now, so I passad this number to config.max_uri_handlers element and thats it.
I hope someone finds this solution useful.
Re: httpd_uri: httpd_register_uri_handler: no slots left for registering handler
Posted: Sat Sep 12, 2020 6:56 pm
by lisa999
Calebe94 wrote: ↑Tue Apr 07, 2020 5:51 pm
Hello my friend,
I've just solved the problem by specifying the max_uri_handlers on my init_webservice function.
The solution can be seeing below:
Code: Select all
esp_err_t init_webservice(char * base_path, httpd_handle_t * auxserver, rest_server_context_t * auxrest_context)
{
...
httpd_handle_t server = NULL;
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
config.max_uri_handlers = 10;
config.uri_match_fn = httpd_uri_match_wildcard;
...
init_routes(server, rest_context);
}
My current project is using 10 routes right now, so I passad this number to config.max_uri_handlers element and thats it.
I hope someone finds this solution useful.
Thx!
Re: httpd_uri: httpd_register_uri_handler: no slots left for registering handler
Posted: Sat May 21, 2022 11:09 pm
by sergiomarina
Very good!!