When using SBFspot with a poor Bluetooth connection to the inverter, memory leaks may occur.
From time to time the BT connection times-out and gets disconnected, causing the program to hang. After some time you'll see several SBFspot processes eating up the memory:
```
pi@rpi01:~ $ ps -aux|grep SBFspot
root 548 69.4 8.2 52388 36512 ? Rs Jul25 8002:23 /usr/local/bin/sbfspot.3/SBFspotUploadDaemon
pi 2120 0.0 0.2 1884 1084 ? Ss Jul29 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 2121 0.0 0.5 5140 2476 ? S Jul29 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 2127 0.0 0.7 5496 3404 ? S Jul29 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 7192 0.0 0.2 1884 1096 ? Ss Jul26 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 7193 0.0 0.5 5140 2492 ? S Jul26 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 7199 0.0 0.7 5496 3524 ? S Jul26 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 10272 0.0 0.2 1884 1092 ? Ss Jul30 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 10274 0.0 0.5 5140 2512 ? S Jul30 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 10285 0.0 0.8 5496 3632 ? S Jul30 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 10882 0.0 0.4 4804 1784 pts/0 S+ 23:10 0:00 grep --color=auto SBFspot
pi 11312 0.0 0.2 1884 1084 ? Ss Jul26 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 11313 0.0 0.5 5140 2492 ? S Jul26 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 11319 0.0 0.8 5496 3640 ? S Jul26 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 12770 0.0 0.2 1884 1092 ? Ss Jul30 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 12771 0.0 0.5 5140 2564 ? S Jul30 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 12777 0.0 0.8 5496 3664 ? S Jul30 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 13867 0.0 0.2 1884 1068 ? Ss Jul30 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 13868 0.0 0.5 5140 2520 ? S Jul30 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 13874 0.0 0.7 5496 3556 ? S Jul30 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 14979 0.0 0.2 1884 1112 ? Ss Aug01 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 14980 0.0 0.5 5140 2540 ? S Aug01 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 14986 0.0 0.7 5496 3528 ? S Aug01 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
```
When we look at the log of Aug01, we can see this:
```
Energy Production:
EToday: 0.852kWh
ETotal: 22764.312kWh
Operation Time: 24210.94h
Feed-In Time : 23521.01h
getSpotDCPower returned an error: -1
getSpotDCVoltage returned an error: -1
SUSyID: 78 - SN: 2100XXXXX
DC Spot Data:
String 1 Pdc: 0.000kW - Udc: 0.00V - Idc: 0.000A
String 2 Pdc: 0.000kW - Udc: 0.00V - Idc: 0.000A
getSpotACPower returned an error: -1
recv() returned an error: 110
getSpotACVoltage returned an error: -1
send() returned an error: 107
Mon 1 Aug 09:45:01 CEST 2016
```
All other log files have the same socket errors:
```
Error 110 = Connection timed out
Error 107 = Transport endpoint is not connected
```
From time to time the BT connection times-out and gets disconnected, causing the program to hang. After some time you'll see several SBFspot processes eating up the memory:
```
pi@rpi01:~ $ ps -aux|grep SBFspot
root 548 69.4 8.2 52388 36512 ? Rs Jul25 8002:23 /usr/local/bin/sbfspot.3/SBFspotUploadDaemon
pi 2120 0.0 0.2 1884 1084 ? Ss Jul29 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 2121 0.0 0.5 5140 2476 ? S Jul29 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 2127 0.0 0.7 5496 3404 ? S Jul29 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 7192 0.0 0.2 1884 1096 ? Ss Jul26 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 7193 0.0 0.5 5140 2492 ? S Jul26 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 7199 0.0 0.7 5496 3524 ? S Jul26 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 10272 0.0 0.2 1884 1092 ? Ss Jul30 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 10274 0.0 0.5 5140 2512 ? S Jul30 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 10285 0.0 0.8 5496 3632 ? S Jul30 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 10882 0.0 0.4 4804 1784 pts/0 S+ 23:10 0:00 grep --color=auto SBFspot
pi 11312 0.0 0.2 1884 1084 ? Ss Jul26 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 11313 0.0 0.5 5140 2492 ? S Jul26 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 11319 0.0 0.8 5496 3640 ? S Jul26 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 12770 0.0 0.2 1884 1092 ? Ss Jul30 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 12771 0.0 0.5 5140 2564 ? S Jul30 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 12777 0.0 0.8 5496 3664 ? S Jul30 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 13867 0.0 0.2 1884 1068 ? Ss Jul30 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 13868 0.0 0.5 5140 2520 ? S Jul30 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 13874 0.0 0.7 5496 3556 ? S Jul30 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
pi 14979 0.0 0.2 1884 1112 ? Ss Aug01 0:00 /bin/sh -c /usr/local/bin/sbfspot.3/SBFspot.sh > /dev/null
pi 14980 0.0 0.5 5140 2540 ? S Aug01 0:00 /bin/bash /usr/local/bin/sbfspot.3/SBFspot.sh
pi 14986 0.0 0.7 5496 3528 ? S Aug01 0:00 /usr/local/bin/sbfspot.3/SBFspot -installer -password:1111 -v5 -ad1 -am1 -ae1 -nocsv
```
When we look at the log of Aug01, we can see this:
```
Energy Production:
EToday: 0.852kWh
ETotal: 22764.312kWh
Operation Time: 24210.94h
Feed-In Time : 23521.01h
getSpotDCPower returned an error: -1
getSpotDCVoltage returned an error: -1
SUSyID: 78 - SN: 2100XXXXX
DC Spot Data:
String 1 Pdc: 0.000kW - Udc: 0.00V - Idc: 0.000A
String 2 Pdc: 0.000kW - Udc: 0.00V - Idc: 0.000A
getSpotACPower returned an error: -1
recv() returned an error: 110
getSpotACVoltage returned an error: -1
send() returned an error: 107
Mon 1 Aug 09:45:01 CEST 2016
```
All other log files have the same socket errors:
```
Error 110 = Connection timed out
Error 107 = Transport endpoint is not connected
```