Correct(ish), Whilst having 9000 frames in the buffer may not be a big problem, ie a network outage etc. The fact it is reprinting every single frame to the log following each connection fail (at 30s in the case) is way too much logging, Look at these 2 excerpts
2017-10-25 12:20:32,967 DEBUG emoncmsorg 7 adding frame to buffer => [1508948104.9068, 8, 268.05240000000003, 270.1798, 151, 2, 121.9404224, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,968 DEBUG emoncmsorg 8 adding frame to buffer => [1508948112.71224, 8, 272.3072, 263.79760000000005, 149, 2, 121.874336, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,970 DEBUG emoncmsorg 9 adding frame to buffer => [1508948122.577907, 8, 268.05240000000003, 280.8168, 162, 2, 121.88535040000001, 300, 300, 300, 300, 300, 300, 0, -22]
2017-10-25 12:20:32,971 DEBUG emoncmsorg 10 adding frame to buffer => [1508948132.495167, 8, 270.1798, 268.05240000000003, 152, 2, 121.874336, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:20:32,972 DEBUG emoncmsorg 11 adding frame to buffer => [1508948142.394418, 8, 270.1798, 270.1798, 152, 2, 121.874336, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:20:32,974 DEBUG emoncmsorg 12 adding frame to buffer => [1508948152.330079, 8, 270.1798, 268.05240000000003, 151, 2, 121.80824960000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,975 DEBUG emoncmsorg 13 adding frame to buffer => [1508948162.218968, 8, 295.70860000000005, 268.05240000000003, 154, 2, 121.6760768, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:20:32,976 DEBUG emoncmsorg 14 adding frame to buffer => [1508948172.110196, 8, 270.1798, 268.05240000000003, 152, 2, 121.7201344, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,978 DEBUG emoncmsorg 15 adding frame to buffer => [1508948181.99857, 8, 278.68940000000003, 274.43460000000005, 153, 2, 121.68709120000001, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:20:32,979 DEBUG emoncmsorg 16 adding frame to buffer => [1508948191.936033, 8, 268.05240000000003, 272.3072, 151, 2, 121.64303360000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,980 DEBUG emoncmsorg 17 adding frame to buffer => [1508948201.870546, 8, 270.1798, 268.05240000000003, 153, 2, 121.66506240000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,981 DEBUG emoncmsorg 18 adding frame to buffer => [1508948211.742361, 8, 270.1798, 274.43460000000005, 154, 2, 121.49984640000001, 300, 300, 300, 300, 300, 300, 0, -21]
2017-10-25 12:20:32,982 DEBUG emoncmsorg 19 adding frame to buffer => [1508948221.640716, 8, 270.1798, 268.05240000000003, 153, 2, 121.49984640000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,984 DEBUG emoncmsorg 20 adding frame to buffer => [1508948231.589884, 8, 272.3072, 268.05240000000003, 152, 2, 121.488832, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,985 DEBUG emoncmsorg 21 adding frame to buffer => [1508948241.44829, 8, 268.05240000000003, 268.05240000000003, 152, 2, 121.4117312, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,986 DEBUG emoncmsorg 22 adding frame to buffer => [1508948251.387498, 8, 270.1798, 272.3072, 154, 2, 121.47781760000001, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:20:32,987 DEBUG emoncmsorg 23 adding frame to buffer => [1508948261.311877, 8, 270.1798, 270.1798, 152, 2, 121.2244864, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,989 DEBUG emoncmsorg 24 adding frame to buffer => [1508948271.195006, 8, 268.05240000000003, 265.925, 152, 2, 121.2905728, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:20:32,990 DEBUG emoncmsorg 25 adding frame to buffer => [1508948281.119016, 8, 265.925, 276.562, 153, 2, 121.268544, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,991 DEBUG emoncmsorg 26 adding frame to buffer => [1508948291.016204, 8, 268.05240000000003, 272.3072, 153, 2, 121.4668032, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:20:32,993 DEBUG emoncmsorg 27 adding frame to buffer => [1508948300.857662, 8, 280.8168, 272.3072, 151, 2, 121.40071680000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,994 DEBUG emoncmsorg 28 adding frame to buffer => [1508948310.86893, 8, 268.05240000000003, 268.05240000000003, 152, 2, 121.323616, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,995 DEBUG emoncmsorg 29 adding frame to buffer => [1508948320.761039, 8, 278.68940000000003, 270.1798, 152, 2, 121.31260160000001, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:20:32,997 DEBUG emoncmsorg 30 adding frame to buffer => [1508948330.592253, 8, 268.05240000000003, 282.9442, 177, 2, 121.49984640000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:32,999 DEBUG emoncmsorg 31 adding frame to buffer => [1508948340.500651, 8, 274.43460000000005, 270.1798, 151, 2, 121.25752960000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:33,000 DEBUG emoncmsorg 32 adding frame to buffer => [1508948350.474229, 8, 268.05240000000003, 270.1798, 151, 2, 121.42274560000001, 300, 300, 300, 300, 300, 300, 0, -19]
2017-10-25 12:20:33,001 DEBUG emoncmsorg 33 adding frame to buffer => [1508948360.309507, 8, 270.1798, 268.05240000000003, 152, 2, 121.21347200000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:33,003 DEBUG emoncmsorg 34 adding frame to buffer => [1508948370.22416, 8, 272.3072, 268.05240000000003, 152, 2, 121.42274560000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:33,004 DEBUG emoncmsorg 35 adding frame to buffer => [1508948380.120865, 8, 270.1798, 268.05240000000003, 151, 2, 121.45578880000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:33,005 DEBUG emoncmsorg 36 adding frame to buffer => [1508948390.024671, 8, 272.3072, 272.3072, 151, 2, 121.59897600000001, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:20:33,006 DEBUG emoncmsorg 37 adding frame to buffer => [1508948400.013285, 8, 270.1798, 268.05240000000003, 151, 2, 121.268544, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:20:33,008 DEBUG emoncmsorg 38 adding frame to buffer => [1508948409.870501, 8, 287.199, 268.05240000000003, 152, 2, 121.323616, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:20:33,009 DEBUG emoncmsorg 39 adding frame to buffer => [1508948419.792618, 8, 285.07160000000005, 265.925, 146, 2, 121.323616, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:20:33,010 DEBUG emoncmsorg 40 adding frame to buffer => [1508948429.675722, 8, 282.9442, 270.1798, 152, 2, 121.1804288, 300, 300, 300, 300, 300, 300, 0, -22]
2017-10-25 12:20:33,011 DEBUG emoncmsorg Sending bulkdata, length: 34
2017-10-25 12:20:33,012 DEBUG emoncmsorg Sending bulkdata, success: False
2017-10-25 12:20:33,013 DEBUG emoncmsorg New queue length: 34
2017-10-25 12:21:02,980 DEBUG emoncmsorg 7 adding frame to buffer => [1508948104.9068, 8, 268.05240000000003, 270.1798, 151, 2, 121.9404224, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:02,982 DEBUG emoncmsorg 8 adding frame to buffer => [1508948112.71224, 8, 272.3072, 263.79760000000005, 149, 2, 121.874336, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:02,983 DEBUG emoncmsorg 9 adding frame to buffer => [1508948122.577907, 8, 268.05240000000003, 280.8168, 162, 2, 121.88535040000001, 300, 300, 300, 300, 300, 300, 0, -22]
2017-10-25 12:21:02,984 DEBUG emoncmsorg 10 adding frame to buffer => [1508948132.495167, 8, 270.1798, 268.05240000000003, 152, 2, 121.874336, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:02,986 DEBUG emoncmsorg 11 adding frame to buffer => [1508948142.394418, 8, 270.1798, 270.1798, 152, 2, 121.874336, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:02,987 DEBUG emoncmsorg 12 adding frame to buffer => [1508948152.330079, 8, 270.1798, 268.05240000000003, 151, 2, 121.80824960000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:02,988 DEBUG emoncmsorg 13 adding frame to buffer => [1508948162.218968, 8, 295.70860000000005, 268.05240000000003, 154, 2, 121.6760768, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:02,990 DEBUG emoncmsorg 14 adding frame to buffer => [1508948172.110196, 8, 270.1798, 268.05240000000003, 152, 2, 121.7201344, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:02,991 DEBUG emoncmsorg 15 adding frame to buffer => [1508948181.99857, 8, 278.68940000000003, 274.43460000000005, 153, 2, 121.68709120000001, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:02,992 DEBUG emoncmsorg 16 adding frame to buffer => [1508948191.936033, 8, 268.05240000000003, 272.3072, 151, 2, 121.64303360000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:02,993 DEBUG emoncmsorg 17 adding frame to buffer => [1508948201.870546, 8, 270.1798, 268.05240000000003, 153, 2, 121.66506240000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:02,995 DEBUG emoncmsorg 18 adding frame to buffer => [1508948211.742361, 8, 270.1798, 274.43460000000005, 154, 2, 121.49984640000001, 300, 300, 300, 300, 300, 300, 0, -21]
2017-10-25 12:21:02,996 DEBUG emoncmsorg 19 adding frame to buffer => [1508948221.640716, 8, 270.1798, 268.05240000000003, 153, 2, 121.49984640000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:02,997 DEBUG emoncmsorg 20 adding frame to buffer => [1508948231.589884, 8, 272.3072, 268.05240000000003, 152, 2, 121.488832, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:02,999 DEBUG emoncmsorg 21 adding frame to buffer => [1508948241.44829, 8, 268.05240000000003, 268.05240000000003, 152, 2, 121.4117312, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,000 DEBUG emoncmsorg 22 adding frame to buffer => [1508948251.387498, 8, 270.1798, 272.3072, 154, 2, 121.47781760000001, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:03,001 DEBUG emoncmsorg 23 adding frame to buffer => [1508948261.311877, 8, 270.1798, 270.1798, 152, 2, 121.2244864, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,002 DEBUG emoncmsorg 24 adding frame to buffer => [1508948271.195006, 8, 268.05240000000003, 265.925, 152, 2, 121.2905728, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:03,004 DEBUG emoncmsorg 25 adding frame to buffer => [1508948281.119016, 8, 265.925, 276.562, 153, 2, 121.268544, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,005 DEBUG emoncmsorg 26 adding frame to buffer => [1508948291.016204, 8, 268.05240000000003, 272.3072, 153, 2, 121.4668032, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:03,007 DEBUG emoncmsorg 27 adding frame to buffer => [1508948300.857662, 8, 280.8168, 272.3072, 151, 2, 121.40071680000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,009 DEBUG emoncmsorg 28 adding frame to buffer => [1508948310.86893, 8, 268.05240000000003, 268.05240000000003, 152, 2, 121.323616, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,011 DEBUG emoncmsorg 29 adding frame to buffer => [1508948320.761039, 8, 278.68940000000003, 270.1798, 152, 2, 121.31260160000001, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:03,012 DEBUG emoncmsorg 30 adding frame to buffer => [1508948330.592253, 8, 268.05240000000003, 282.9442, 177, 2, 121.49984640000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,014 DEBUG emoncmsorg 31 adding frame to buffer => [1508948340.500651, 8, 274.43460000000005, 270.1798, 151, 2, 121.25752960000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,015 DEBUG emoncmsorg 32 adding frame to buffer => [1508948350.474229, 8, 268.05240000000003, 270.1798, 151, 2, 121.42274560000001, 300, 300, 300, 300, 300, 300, 0, -19]
2017-10-25 12:21:03,016 DEBUG emoncmsorg 33 adding frame to buffer => [1508948360.309507, 8, 270.1798, 268.05240000000003, 152, 2, 121.21347200000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,018 DEBUG emoncmsorg 34 adding frame to buffer => [1508948370.22416, 8, 272.3072, 268.05240000000003, 152, 2, 121.42274560000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,019 DEBUG emoncmsorg 35 adding frame to buffer => [1508948380.120865, 8, 270.1798, 268.05240000000003, 151, 2, 121.45578880000001, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,020 DEBUG emoncmsorg 36 adding frame to buffer => [1508948390.024671, 8, 272.3072, 272.3072, 151, 2, 121.59897600000001, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:03,021 DEBUG emoncmsorg 37 adding frame to buffer => [1508948400.013285, 8, 270.1798, 268.05240000000003, 151, 2, 121.268544, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,023 DEBUG emoncmsorg 38 adding frame to buffer => [1508948409.870501, 8, 287.199, 268.05240000000003, 152, 2, 121.323616, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:03,024 DEBUG emoncmsorg 39 adding frame to buffer => [1508948419.792618, 8, 285.07160000000005, 265.925, 146, 2, 121.323616, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:03,025 DEBUG emoncmsorg 40 adding frame to buffer => [1508948429.675722, 8, 282.9442, 270.1798, 152, 2, 121.1804288, 300, 300, 300, 300, 300, 300, 0, -22]
2017-10-25 12:21:03,026 DEBUG emoncmsorg 41 adding frame to buffer => [1508948439.626809, 8, 270.1798, 270.1798, 151, 2, 121.1584, 300, 300, 300, 300, 300, 300, 0, -28]
2017-10-25 12:21:03,028 DEBUG emoncmsorg 42 adding frame to buffer => [1508948449.449423, 8, 268.05240000000003, 268.05240000000003, 151, 2, 121.1804288, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,029 DEBUG emoncmsorg 43 adding frame to buffer => [1508948459.431012, 8, 265.925, 268.05240000000003, 150, 2, 121.1804288, 300, 300, 300, 300, 300, 300, 0, -27]
2017-10-25 12:21:03,030 DEBUG emoncmsorg Sending bulkdata, length: 37
2017-10-25 12:21:03,031 DEBUG emoncmsorg Sending bulkdata, success: False
2017-10-25 12:21:03,032 DEBUG emoncmsorg New queue length: 37
They are just 30secs apart and the queue has correctly increased by another 3 frames, but it is reprinting the whole buffer to the log every 30secs, to reach 9000 frames in the buffer it will have retried sending 3000 times and over that time it will have printed well over 13.5 MILLION âadding frame to bufferâ lines which doesnât include the 3000x3 sending and buffer status logs.
As for the cause (or logging) of the sending of data, the logs previously showed the make up of the url and the response received, none of that data seems to be printed to the log anymore [edit - Ok I see the code is still there itâs just not being used in this instance] so we cannot tell what happened. I also notice there is only 1uSec between sending and the âsuccess falseâ message so are we sure a send was even attempted?
Aside from the over logging issue and the messages saying âsendingâ when it isnât sending, this also raises 2 more important points. I cannot see any form of size restriction on the buffer, so in theory an unused emoncmsorg interfacer could grow itâs buffer in ram unrestricted until it effects performance or chokes. Also when a network comes on line after a prolonged outage how will emoncms.org cope with an unlimited number of frames arriving in one request? If the request is attempted but timeout reached before all packets are processed would that mean the data can never get uploaded?
Originally emonhub had a setting for the max number of frames and when the limit was reached it would delete the oldest to make room for the newest. I also had settings for the max number of frames that could be included in any one request so that emoncms.org didnât get battered.