Replies: 2 comments 1 reply
-
ending and beginning won't help much because free the memory. Maybe try instead to completely delete the ESPAsyncWebServer: ESPAsyncWebServer* pointer = new ESPAsyncWebServer(80); server.end(); An then fully recreate it. But this is hardly an advises solution if you have memory pressure... If you have memory pressure, probably you need to look at what cause them instead in your code or if something can be improved elsewhere. ESPAsyncWebServer is not what takes the more heap, but much more how you use it instead, In any case, a better approach to pause request serving would be to add a middleware. You can look at the examples in the project about how to create one and an idea could be to base your middleware on the Rate Limiter one. |
Beta Was this translation helpful? Give feedback.
-
|
This works ok. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to prevent webserver requests during some heavy memory usage operations.
I'm calling
server.end();at operation startand
server.begin();at operation end.4/10 times, the webserver does not start.
Beta Was this translation helpful? Give feedback.
All reactions