REST API history of a pin retrieves only 20299 records

Hi
i used to get one month back ( 1 minute sampling rate) records (40000+) from my local server (now version0.41.12).
Since some time ago, what i get is only 20299 records, which translates to 14days 2hours and 19min back.
I know that this is more or less hard-wired into server’s code.
I was wondering if there is a way to increase that, either by increasing number of records or increasing sampling rate to let’s say 15min (but not so much like the 1hour file which already exists on the server).
I would be ready to recompile sources in order to achieve this

Best Regards
Kostas

I don’t know if these server.properties settings in your Local Blynk Server have anything to do with your problem or not. You can try to increase them and see if new server versions might introduce new bugs.


#max size of web request in bytes, 256 kb (256x1024) is default
web.request.max.size=524288

#maximum number of points that are fetched during CSV export
#43200 == 60 * 24 * 30 - minutes points for 1 month
#csv.export.data.points.max=43200
csv.export.data.points.max=86400

Another issue you mentioned quite a while ago is “ISR not in IRAM”

The only “drawback” is that i have to work with 2.4.2 version of esp8266 library instead of the 2.5.2 current version, in order to avoid “ISR not in IRAM” cause of continuous restart of NodeMCU.

The simple solution is to add ICACHE_RAM_ATTR to your ISR function. For example :

void ICACHE_RAM_ATTR ISR_Function(void)

Otherwise, the ESP8266 core version 2.5.2+ will complain “ISR not in IRAM” and continuously restart the board.

Dear @khoih
Thank you very much
I use csv.export.data.points.max=133920
long time ago without success. Maybe @Dmitriy has more info about.
As of the 2.5.2 lib specific behaviour i revert back to 2.4.2 which works reliably with my application.
If i remember well i had to modify code into Blynk dynamic provision’s code, which was under evaluation that time. Later on, i reverted back to open libraries.
Best Regards
Kostas

Hello. You can try to add store.minute.record.days=365 to the server.properties it may help.

That explains everything.

IMHO, this bug has been introduced from blynk-server-0.39.10 and later in the file

blynk-server-0.39.10/server/core/src/main/java/cc/blynk/server/Limits.java

with this line of code:

this.storeMinuteRecordDays = props.getIntProperty("store.minute.record.days", 10);

that defaults "store.minute.record.days" to 10 days as we normally don’t have the following line
in server.properties:

store.minute.record.days=30

This line was not in the Limits.java file from blynk-server-0.39.9 and earlier.

Thank you both!
Indeed store.minute.record.days=30 or 365 should change the situation.
Property added to my server.properties file and i will let you know progress

Best Regards
Kostas