I have my WiPy working as a lighting controller in my poultry brooder. My software starts up the Telnet/FTP server support on the WiPy as part of the initialization. My code then runs its main loop, logging progress. There is also a watchdog set in case my main loop hangs. The main loop also does periodic garbage collection. It whole purpose of the main loop is to watch time move by and changing lighting intensity.
What I see happening though is that after about 3 days of running I can no longer Telnet into the WiPy device or use FTP to pull my log files. I must restart the device. When I look at the log files I see my code was running just fine up to the time that I restarted the WiPy.
So, I'm looking for clues as to why the servers are going down and what to do about it.
Thanks
WiPy 1.0 FTP/Telnet Servers hang after days
-
- Posts: 2
- Joined: Wed Apr 26, 2017 3:46 am
Re: WiPy 1.0 FTP/Telnet Servers hang after days
Hello @PoultryGuy, did you try to set the server timeout parameter, as depiccted here: http://docs.micropython.org/en/latest/w ... er.timeout
-
- Posts: 2
- Joined: Wed Apr 26, 2017 3:46 am
Re: WiPy 1.0 FTP/Telnet Servers hang after days
I set the server timeout for 300. I added code so that if the WiFi connection gets dropped, it gets reestablished within seconds. It didn't seem logical that I should need to stop and restart the server if I had to connect the WiFi but perhaps that is necessary?