-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
ESP8266 is crashing while writing to firebase realtime database #356
Comments
That's because of memory leaks or low free heap. You should debug your code first and this is not a library issue. |
You should read this information. If you are using the old version esp8266 sdk, you should update. |
Hi |
The library was well managed. It is not possible at the current release for memory leaks. Your device free heap is very critically low which I will never run my esp8266 device in this extremely low memory like this. Your device should have at least 15-20k when you are using SSL client application. Only 10k is impossible to make SSL client works and the system tasks may fail internally. You should think again in this issue. |
Is there any way to use http instead of https connection so ssl is not required ? |
I replied in new post. |
Hi
I've an application on an ESP8266 which incements a integer every 15 seconds and than writ it to a firebase realtime database
This works, but sometime after a few seconds or minutes sometimes after a few day the esp8266 chrases and reboots and than ist starts again
the last print on serial monitor i see is shown below:
11:40:08.998 > Token info: type = id token (GITKit token), status = on refreshing
11:40:10.553 >
11:40:10.554 > --------------- CUT HERE FOR EXCEPTION DECODER ---------------
11:40:10.559 >
11:40:10.559 > Exception (29):
11:40:10.559 > epc1=0x4023cd30 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
11:40:10.750 >
11:40:10.750 > StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores
11:40:10.750 > epc1=0x4023cd30 in HttpHelper::readLine(Client*, char*, int) at .pio\libdeps\d1_mini\Firebase ESP8266 Client\src/FB_Utils.h:1097
11:40:10.750 > (inlined by) HttpHelper::readChunkedData(MB_FS*, Client*, char*, MB_String*, fb_esp_tcp_response_handler_t&) at .pio\libdeps\d1_mini\Firebase ESP8266 Client\src/FB_Utils.h:1228
It seems that is has something to do with writing while token is on status on refrehing ? But how can i prevent this ?
Writing will be done in the loop function as shown below:
if (Firebase.ready() && (millis() - sendDataPrevMillis > 15000 || sendDataPrevMillis == 0)){
sendDataPrevMillis = millis();
// Write an Int number on the database path test/int
if (Firebase.RTDB.setInt(&fbdo, "test/int", count)){
Serial.println("PASSED");
Serial.println("PATH: " + fbdo.dataPath());
Serial.println("TYPE: " + fbdo.dataType());
}
else {
Serial.println("FAILED");
Serial.println("REASON: " + fbdo.errorReason());
}
count++;
}
thanks for your help
The text was updated successfully, but these errors were encountered: