-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heap is running out #2967
Comments
I made some investigations: Check the following very simple sketch: #include <ESP8266WiFi.h> const char* ssid = S_SSID; const char* password = S_PASSWORD; // Create an instance of the server // specify the port to listen on as an argument WiFiServer server(80); void setup() { Serial.begin(115200); // Connect to WiFi network Serial.println(); Serial.print("Connecting to "); Serial.println(ssid); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected"); // Start the server server.begin(); Serial.println("Server started"); // Print the IP address Serial.println(WiFi.localIP()); } void loop() { Serial.write(27); //Print "esc" Serial.print("[0;0H"); // Terminal command cursor Home // Serial.print("[2J"); // Terminal command clear-screen Serial.print(F("Free Heap Size:\t")); Serial.print(ESP.getFreeHeap()); Serial.println(F(" Bytes")); // Check if a client has connected WiFiClient client = server.available(); if (!client) { return; } // Wait until the client sends some data Serial.println("new client"); while(!client.available()){ delay(1); } // Read the first line of the request String req = client.readStringUntil('\r'); Serial.println(req); client.flush(); } |
...ir recovers, but it takes MINUTES! |
... and if you keep f5 pressed exception 28 or 29 occours. „Nihil est in ESP, quod non fuerit in intellectu" - Nichts ist im ESP, was zuvor nicht im Verstand war. |
@OrakelKSL is this issu still valid? |
Old issue and no feedback in over a month => closing. |
there is a workaround for running out of heap due to sockets kept in TIME_WAIT. |
Basic Infos
Hardware
Hardware: ESP-12 (NodeMCU V2)
Core Version: 2.3.0
Description
As you can see in serial monitor: If you are tilting your mobile heap is running out quickly.
Settings in IDE
Module: NodeMCU 1.0
Flash Size: 4MB
CPU Frequency: 80Mhz
Flash Mode: ?qio?
Flash Frequency: 40Mhz
Upload Using: OTA / SERIAL
Reset Method: ck / nodemcu
Sketch
Debug Messages
Heap started with 40192 and runs down to:
�[2JFree Heap Size: 272 Bytes
GET /engines/285,371 HTTP/1.1
[285][371]
Zykluszeit: 216
Exception (28):
epc1=0x4020498f epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000008 depc=0x00000000
ctx: sys
sp: 3ffff990 end: 3fffffb0 offset: 01a0
The text was updated successfully, but these errors were encountered: