[SOLVED] Wifi gateway crashing ~20min
- 
					
					
					
					
 Re: WifiGateway crashes after 1 or 2 days Similar issue: ESP8266 GW with local pulse counter sensor, no radio, no other children, development branch, v2.0.1-beta. After about 20min Domoticz shows: 
 2016-09-18 12:24:49.422 (ESP) Usage (Usage)
 2016-09-18 12:24:49.443 (ESP) General/kWh (Meter)
 2016-09-18 12:24:59.387 (ESP) General/kWh (Meter)
 2016-09-18 12:24:59.454 (ESP) Usage (Usage)
 2016-09-18 12:24:59.479 (ESP) General/kWh (Meter)
 2016-09-18 12:25:38.449 Error: MySensors: The semaphore timeout period has expired
 2016-09-18 12:25:38.449 TCP: Reconnecting in 30 seconds...
 2016-09-18 12:26:08.477 TCP: Reconnecting...Watching the serial, the error builds up over time and then boom! See attached file 0_1474217602140_LmacRxBlk Issue.txt. 
 LmacRxBlk:1
 LmacRxBlk:1
 LmacRxBlk:1
 LmacRxBlk:1
 LmacRxBlk:1
 LmacRxBlk:1
 LmacRxBlk:1
 LmacRxBlk:1
 LmacRxBlk:1
 LmacRxBlk:1
 0;255;3;0;9;No free slot availableRecovers after about 10min, maybe a timeout or cleanup of some sort? 
 0;255;3;0;9;No free slot available
 Watt:727
 Interval:4950348
 kWH: 9.84
 0;255;3;0;9;Client 0 disconnected
 Watt:714
 Interval:5035182
 kWH: 9.84
 0;255;3;0;9;Client 0 connected
 Watt:721
 Interval:4988227
 kWH: 9.84
 0;255;3;0;9;Client 0: 0;0;3;0;2;
 Watt:710
 Interval:5068874
 kWH: 9.84I tend to agree with the suggestion in the other post about using up the sockets, but I need help with what to do about it. Any ideas, please? 
 
- 
					
					
					
					
 @carlyler - do you have any other hardware connected to Domoticz? 
 I saw this issue trying to connect two different controllers to the same gateway.
 
- 
					
					
					
					
 Hi sundberg84. Thank you for the reply. 
 Currently I just have the 1 ESP8266.
 I think I found the issue. There is a a lot written online about the error and what I got from it was the ESP8266 is being asked to do more than it has time to do. Given that I was only transmitting every 10sec I started looking at what might be tying things up. From the MySensors ESP8266 example I had, naively, changed the sleeps to delays, since I did not want it sleeping. I realized that might be killing the ESP8266. So I changed the loop function to run freely and the code to be executed on interval. I have not seen the error since.
 
- 
					
					
					
					
 @carlyler - good to hear! Thanks for reporting back. 
 
- 
					
					
					
					
 Hello everybody. 
 Today I started testing a bundle of ESP - MQTT version lib Mysensors 2.2.0 | 0x020200FF | final
 I ran the stress test and after 5 minutes of requests, the ESP drops down.I changed 3 times all equipment 
 As MQTT, I used different services, but the result is always the same.Is this the problem in the chip ESP8266? This problem was associated with sockets on ESP and was voiced a year and a half ago, but it seems that neither has changed. Maybe I missed something, if there are answers, please tell me how to fix this error. 58002998 Sending message on topic: gateway-1870439-out/2/0/1/0/2 LmacRxBlk:1 LmacRxBlk:1 LmacRxBlk:1 LmacRxBlk:1 58008004 TSF:MSG:READ,2-2-0,s=1,c=2,t=38,pt=0,l=0,sg=0: 58008009 Sending message on topic: gateway-1870439-out/2/1/2/0/38 LmacRxBlk:1 LmacRxBlk:1 LmacRxBlk:1 LmacRxBlk:1 LmacRxBlk:1 58013017 TSF:MSG:SEND,0-0-2-2,s=1,c=1,t=38,pt=7,l=5,sg=0,ft=0,st=OK:220 *************** 58013024 TSF:MSG:READ,2-2-0,s=1,c=1,t=39,pt=7,l=5,sg=0:2.99 58013030 Sending message on topic: gateway-1870439-out/2/1/1/0/39 LmacRxBlk:1 LmacRxBlk:1 LmacRxBlk:1 LmacRxBlk:1 LmacRxBlk:1 58018037 TSF:MSG:READ,2-2-0,s=1,c=1,t=38,pt=7,l=5,sg=0:220 58018042 TSF:MSG:ACK 58018044 Sending message on topic: gateway-1870439-out/2/1/1/1/38 LmacRxBlk:1 LmacRxBlk:1 LmacRxBlk:1 LmacRxBlk:1 LmacRxBlk:1 IP: 192.168.0.15 58023051 Attempting MQTT connection... 58023400 MQTT connected
 
- 
					
					
					
					
 Are you running the default sketch? What arduino ide do you have? What version of esp8266 library are you using? 
 
 
			
		 
			
		 
					
				
