Wio Termianl Web Server stop working

I’m currently developing a project using wio terminal. It holds mostly it holds a BLE server , a wifi web server, and i m using the build in LCD also.
BLE gets datas from sensors, web serser handling http get requests, LCD prints some messages( about 1 message / 2 seconds, 20 bytes per message, low loading!)

most of the time when wio terminal power up or resets , lcd starts success, Wifi connects success, web server starts success;
but the problem is afte some tens of successful handling http get requests from a client, the web server die itself , and at the same time, actually all the code inside the Loop() is not runing any more , only the BLE notifification reception and the corresponding notify call back remain runing .
struggling this issue for days already! all library is updated as requested, any idea ?

void setup() {

  tft.begin();
  tft.setRotation(3);
  tft.fillRect(0,0,320,20,headLineColor);
  tft.fillRect(0,20,320,40,backColor);
  tft.fillRect(0,60,320,180,backColor); 
  tft.setFreeFont(&LCD_FONT);
  tft.setTextColor(TFT_WHITE);
  tft.setCursor(5,15);
  tft.println("*********** Gateway Console ***********");
  //lcd_log_status();

  Serial.begin(115200);

  WiFi.mode(WIFI_STA);
  Serial.println(WiFi.macAddress());
  sprintf(buf, "->Gateway MAC: %s", WiFi.macAddress().c_str());
  lcd_log_line(buf);
  delay(10000);

  WiFi.begin(ssid, password);
  
  // Configures static IP address
  if (!WiFi.config(local_IP, gateway, subnet /*, primaryDNS, secondaryDNS*/)) {
    Serial.println("STA Failed to configure");
    lcd_log_line((char *)"->STA Failed to configure");
  }   

  
  while (WiFi.status() != WL_CONNECTED)
  {    
    delay(500);
    lcd_log_line(itoa((int)WiFi.status(), buf, 10));
    pinMode(RTL8720D_CHIP_PU, OUTPUT);
    digitalWrite(RTL8720D_CHIP_PU, LOW);
    delay(500);
    digitalWrite(RTL8720D_CHIP_PU, HIGH);
    delay(500);
    tcpip_adapter_init(); 
    WiFi.begin(ssid, password);
  }

  Serial.println("");
  Serial.print("Connected to ");
  Serial.println(ssid);
  Serial.print("Local IP address: ");
  Serial.println(WiFi.localIP());
  
  sprintf(buf, "->Connected to: %s", ssid);
  lcd_log_line(buf);
  sprintf(buf, "->Local IP Add: %s", WiFi.localIP().toString().c_str());
  lcd_log_line(buf);
  
  server.on("/", handleRoot);
  server.on("/Info", handleInfo);
  server.on("/Analog/Leakage,HeartBeat", handleStatus);
  server.onNotFound(handleNotFound);
  server.begin();
  Serial.println("HTTP server started!");
  lcd_log_line((char *)"->HTTP server started!");

  
  //  BLE
  Serial.println("Starting Arduino BLE Client application...");
  lcd_log_line((char *)"->Starting BLE Client");
  BLEDevice::init("");

  // Retrieve a Scanner and set the callback we want to use to be informed when we
  // have detected a new device.  Specify that we want active scanning and start the
  // scan to run for 5 seconds.
  BLEScan* pBLEScan = BLEDevice::getScan();
  pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks());
  pBLEScan->setInterval(1349);
  pBLEScan->setWindow(449);
  pBLEScan->setActiveScan(true);
  pBLEScan->start(8, false);

  previousMillis = millis();
} // End of setup.


// This is the Arduino main loop function.
void loop() {

  yield();
  server.handleClient();

  // to update heartBeat Pool
  if (millis() - previousMillis >= 10000){
    String hbmessage ="";
    String leakmessage ="";
    for (byte i=0;i<boardCnt;i++){
     // yield();
      if ( millis()-heartBeatTime[i] >= heartBeatSpec){ heartBeat[i] = boardPool[i]; }
      if (heartBeat[i]!=0){hbmessage+=String(heartBeat[i]);}
      if (leakPool[i]!=0){leakmessage+=String(leakPool[i]);}

    } 
    //Serial.print("Zone HeartBeat status: ");Serial.println(hbmessage.toInt());
    //Serial.print("Zone Leakage status: ");Serial.println(leakmessage.toInt());
    //lcd_log_status();    
    
    previousMillis = millis();
  }
	
  // If the flag "doConnect" is true then we have scanned for and found the desired
  // BLE Server with which we wish to connect.  Now we connect to it.  Once we are 
  // connected we set the connected flag to be true.
  if (doConnect == true) {
    if (connectToServer()) {
      Serial.println("We are now connected to the BLE Server.");
      lcd_log_line((char *)"->connected to BLE Server!");
    } else {
      Serial.println("We have failed to connect to the server; there is nothin more we will do.");
      lcd_log_line((char *)"->BLE Connection Fail!");
    }
    doConnect = false;
  }

  
  if (connected){   
  }
  else if (!connected) {
    NVIC_SystemReset();
    //BLEDevice::getScan()->start(5,false);  // this is just eample to start scan after disconnect, most likely there is better way to do it in arduino
    //Serial.println("BLE: now try to connect again!");
  }

    while (WiFi.status() != WL_CONNECTED)
  {    
    delay(500);
    lcd_log_line(itoa((int)WiFi.status(), buf, 10));
    pinMode(RTL8720D_CHIP_PU, OUTPUT);
    digitalWrite(RTL8720D_CHIP_PU, LOW);
    delay(500);
    digitalWrite(RTL8720D_CHIP_PU, HIGH);
    delay(500);
    tcpip_adapter_init(); 
    WiFi.begin(ssid, password);
  }

} // End of loop

some related functions:

String getLeakageStatus(){
String leakmessage ="";
for (byte i=0;i<boardCnt;i++){
if (leakPool[i]!=0){leakmessage+=String(leakPool[i]);}
}
if (leakmessage==""){leakmessage=“0”;}
return leakmessage;
}

String getHBStatus(){
String hbmessage ="";
for (byte i=0;i<boardCnt;i++){
if (heartBeat[i]!=0){hbmessage+=String(heartBeat[i]);}
}
if (hbmessage==""){hbmessage=“0”;}
return hbmessage;
}

// Routine to send messages to the display
void lcd_log_line(char* line)
{
current_text_line++;
if (current_text_line == 1) {yield();tft.fillRect(0,56,320,184,backColor);}
tft.setTextColor(textColor);
tft.setFreeFont(textFont);
yield();
tft.drawString(line, 5, (current_text_line+2) * LCD_LINE_HEIGHT+2);
current_text_line %= ((LCD_HEIGHT-56)/LCD_LINE_HEIGHT);
}

void lcd_log_status()
{
String HBStatus = getHBStatus();
String LeakageStatus = getLeakageStatus();
if (HBStatus!=“0”){yield();tft.fillRect(0,20,320,18,TFT_RED);}
else{yield();tft.fillRect(0,20,320,18,TFT_GREEN);}
tft.setTextColor(textColor);
tft.setFreeFont(textFont);
yield();
tft.drawString(“HeartBeat Status:”, 5, 1 * LCD_LINE_HEIGHT+2);
yield();
tft.drawNumber(HBStatus.toInt(), 160, 1 * LCD_LINE_HEIGHT+2);

if (LeakageStatus!=“0”){yield();tft.fillRect(0,38,320,18,TFT_RED);}
else{yield();tft.fillRect(0,38,320,18,TFT_GREEN);}
tft.setTextColor(textColor);
tft.setFreeFont(textFont);
yield();
tft.drawString(“Leakage Status:”, 5, 2 * LCD_LINE_HEIGHT+2);
yield();
tft.drawNumber(LeakageStatus.toInt(), 160, 2 * LCD_LINE_HEIGHT+2);
}

void handleRoot() {
server.send(200, “text/plain”, “hello from Wio Terminal!”);
}

void handleNotFound() {
String message = “File Not Found\n\n”;
message += "URI: ";
message += server.uri();
message += "\nMethod: ";
message += (server.method() == HTTP_GET) ? “GET” : “POST”;
message += "\nArguments: ";
message += server.args();
message += “\n”;
for (uint8_t i = 0; i < server.args(); i++) {
message += " " + server.argName(i) + ": " + server.arg(i) + “\n”;
}
server.send(404, “text/plain”, message);
}

void handleInfo(){
String message = “{“InfoNew”:”;
message +="{“HostName”:“WioTerminal_Leak”,“CPU”:“10%”,“IP_Address”:"";
message += WiFi.localIP().toString();
message +="",“RunningProcess”:“Gateway_Leak”,“MAC_Address”:"";
message +=WiFi.macAddress();
message +="",“Temperature”:“0.1’C”,“MEM”:“61.8%”,“DiskUsage”:“61.8%”}}";
yield();
server.send(200, “text/plain”, message);
}

void handleStatus(){
String message = “{“Function”:“Analog”,“SensorList”:”;
message += “[”;
message += “{“Leakage”:”";
message += getLeakageStatus();
message += “”},";
message += “{“HeartBeat”:”";
message += getHBStatus();
message += “”}";
message += “]”;
message += “}”;
yield();
server.send(200, “text/plain”, message);
lcd_log_status();
}