You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It means I can't hold more than 250 readings in memory before sending them to a remote emoncms server.
I guess this is hard-coded to prevent too much load on emoncms.org, but I use this with a private emoncms server where I don't want this restriction. In fact, my remote emonhub lost connectivity over the holidays and after I fixed the network problem today it is now syncing two weeks worth of data (stored thanks to the default buffer size of 100,000) - but it will take forever to send it in chunks of 250 readings to catch up.
I'd like to argue against this restriction. If it's really a problem for emoncms.org then the emoncms.org server should implement some sort of limiting (pretty easy in Apache's configuration), not the client. There's nothing to stop me from modifying the source code to remove this restriction, so it's not really a defence, really just security through obscurity. And, it means my private emoncms server also has to suffer from this restriction and the above problem that resyncing after downtime will take ages.
I suggest this restriction is removed from the client code. If it's really necessary for emoncms.org, consider a server setting to limit POST size or alter the code in emonhub to only apply this restriction if the host is set to emoncms.org.
Also: it was unclear to me from the code that this limit even existed until I dug further into the class hierarchy: child classes like EmonHubEmoncmsHTTPInterfacer should not set private fields on their parents - they are supposed to be private. Use properties or set the value as part of the call to the parent's __init__.
The text was updated successfully, but these errors were encountered:
This line in the source code for the
EmonHubEmoncmsHTTPInterfacer
......stops the
batchsize
configuration setting being set to anything higher than 250 items due to the code inemonhub_interfacer.py
:It means I can't hold more than 250 readings in memory before sending them to a remote emoncms server.
I guess this is hard-coded to prevent too much load on emoncms.org, but I use this with a private emoncms server where I don't want this restriction. In fact, my remote emonhub lost connectivity over the holidays and after I fixed the network problem today it is now syncing two weeks worth of data (stored thanks to the default buffer size of 100,000) - but it will take forever to send it in chunks of 250 readings to catch up.
I'd like to argue against this restriction. If it's really a problem for emoncms.org then the emoncms.org server should implement some sort of limiting (pretty easy in Apache's configuration), not the client. There's nothing to stop me from modifying the source code to remove this restriction, so it's not really a defence, really just security through obscurity. And, it means my private emoncms server also has to suffer from this restriction and the above problem that resyncing after downtime will take ages.
I suggest this restriction is removed from the client code. If it's really necessary for emoncms.org, consider a server setting to limit POST size or alter the code in emonhub to only apply this restriction if the host is set to
emoncms.org
.Also: it was unclear to me from the code that this limit even existed until I dug further into the class hierarchy: child classes like
EmonHubEmoncmsHTTPInterfacer
should not set private fields on their parents - they are supposed to be private. Use properties or set the value as part of the call to the parent's__init__
.The text was updated successfully, but these errors were encountered: