{"action":"created","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/428","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/428/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/428/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/428/events","html_url":"https://github.com/esp8266/Arduino/issues/428","id":88363720,"number":428,"title":"WEB Server reset module randomly","user":{"login":"luc-github","id":8822552,"avatar_url":"https://avatars.githubusercontent.com/u/8822552?v=3","gravatar_id":"","url":"https://api.github.com/users/luc-github","html_url":"https://github.com/luc-github","followers_url":"https://api.github.com/users/luc-github/followers","following_url":"https://api.github.com/users/luc-github/following{/other_user}","gists_url":"https://api.github.com/users/luc-github/gists{/gist_id}","starred_url":"https://api.github.com/users/luc-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luc-github/subscriptions","organizations_url":"https://api.github.com/users/luc-github/orgs","repos_url":"https://api.github.com/users/luc-github/repos","events_url":"https://api.github.com/users/luc-github/events{/privacy}","received_events_url":"https://api.github.com/users/luc-github/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-15T09:02:03Z","updated_at":"2015-06-15T11:03:02Z","closed_at":null,"body":"Hi I am using staging module and I compile using 1.6.4 under windows 7 64bit\r\nI use ESP8266 01 to be a bridge between 3D printer and a web browser to get printer information, for this I do a request every 2 seconds to refresh the content of the web page and this make the module to reset randomly.\r\n\r\nit happens even watchdog is disabled ( between 10min to 8h)\r\nI open 2 web pages at once to make it happen faster\r\nif no pages open the module do not reset at least within 48h ( I did not tested longer)\r\nso currently can be String issue (but did not saw any memory leak) or Webserver issue but I do not know what to test \r\n\r\nIs it a known issue ?\r\nI there anything wrong in the code ?\r\n or anything that should be added to prevent module reset ?\r\n\r\nThanks in advance\r\n\r\n I narrow down the minimal code using helloserver.ino to reproduce the problem (IP is harcoded to limit the usage of any function)\r\n\r\n```\r\n#include <ESP8266WiFi.h>\r\n#include <WiFiClient.h>\r\n#include <ESP8266WebServer.h>\r\n \r\nconst char* ssid = \"dlink\";\r\nconst char* password = \"****\";//I remove my password\r\n\r\nESP8266WebServer server(80);\r\n\r\nvoid handleRoot() {\r\n  String message = \"<HTML><BODY><H1>Page static</H1>\";\r\n  message += \"<IFRAME  width=\\\"200\\\" height=\\\"200\\\"  NAME=\\\"frmstatus\\\"  ID=\\\"frmstatus\\\"  SRC=\\\"http://192.168.0.115/STATUS\\\"></IFRAME>\\n<SCRIPT TYPE=\\\"text/javascript\\\">\\n\";\r\n  message +=\"setInterval(function(){\";\r\n  message +=\"var ifrm=document.getElementById(\\\"frmstatus\\\");var doc=ifrm.contentDocument?ifrm.contentDocument:ifrm.contentWindow.document;\";\r\n  message +=\"doc.location.reload(true);\";\r\n  message +=\"},2000);\\n\";\r\n  message +=\"</SCRIPT>\\n</BODY></HTML>\";\r\n  server.send(200, \"text/html\", message);\r\n \r\n}\r\n\r\nvoid handleSubRoot() {\r\n  static long cnta=0;\r\n  static long cntb=0;\r\n  cnta++;\r\n  if(cnta>100000000)\r\n  {\r\n\t  cntb++;\r\n\t  cnta=0;\r\n  }\r\n  String message = \"<HTML>\\n<BODY>\\n<H1>refreshed page</H1>\";\r\n  message += String(cntb) + \"/\" + String(cnta);\r\n  message +=\"</BODY>\\n</HTML>\\n\";\r\n  server.send(200, \"text/html\", message);\r\n \r\n}\r\n \r\nvoid setup(void){\r\n  ESP.wdtDisable(); //enable or disable reset will happen \r\n  Serial.begin(115200);\r\n  WiFi.begin(ssid, password);\r\n  Serial.println(\"\");\r\n\r\n  // Wait for connection\r\n  while (WiFi.status() != WL_CONNECTED) {\r\n    delay(500);\r\n    Serial.print(\".\");\r\n  }\r\n  Serial.println(\"\");\r\n  Serial.print(\"Connected to \");\r\n  Serial.println(ssid);\r\n  Serial.print(\"IP address: \");\r\n  Serial.println(WiFi.localIP());\r\n  \r\n  \r\n  server.on(\"/\", handleRoot);\r\n  server.on(\"/STATUS\", handleSubRoot);\r\n  \r\n  server.begin();\r\n  Serial.println(\"HTTP server started\");\r\n}\r\n \r\nvoid loop(void){\r\n  server.handleClient();\r\n} \r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/comments/112018700","html_url":"https://github.com/esp8266/Arduino/issues/428#issuecomment-112018700","issue_url":"https://api.github.com/repos/esp8266/Arduino/issues/428","id":112018700,"user":{"login":"holgerlembke","id":2034993,"avatar_url":"https://avatars.githubusercontent.com/u/2034993?v=3","gravatar_id":"","url":"https://api.github.com/users/holgerlembke","html_url":"https://github.com/holgerlembke","followers_url":"https://api.github.com/users/holgerlembke/followers","following_url":"https://api.github.com/users/holgerlembke/following{/other_user}","gists_url":"https://api.github.com/users/holgerlembke/gists{/gist_id}","starred_url":"https://api.github.com/users/holgerlembke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holgerlembke/subscriptions","organizations_url":"https://api.github.com/users/holgerlembke/orgs","repos_url":"https://api.github.com/users/holgerlembke/repos","events_url":"https://api.github.com/users/holgerlembke/events{/privacy}","received_events_url":"https://api.github.com/users/holgerlembke/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T11:03:02Z","updated_at":"2015-06-15T11:03:02Z","body":"Even inside those routines?\r\n\r\nTo be sure perhaps some Serial.println() into ESP8266WebServer::send and related stuff.\r\n\r\nWhen I used web server first time, holding down F5 in IE killed it instantly, see #230."}}