gotthardp / lorawan-server

Compact server for private LoRaWAN networks
https://gotthardp.github.io/lorawan-server
MIT License
941 stars 326 forks source link

Purge database size for events also #606

Open hallard opened 5 years ago

hallard commented 5 years ago

We need to decrease database size, on multitech GW with lot of devices, sometime admin interface does not answer anymore until we delete the following files:

As asked in decrease database size #601 We understand we can use parameter

 % amount of rxframes retained for each device/node
    {retained_rxframes, 50},

Is there something similar for events ?

Thansks

gotthardp commented 5 years ago

Yes, there is: {event_lifetime, 86400}. The number means how many seconds is an event displayed before it gets deleted.

hallard commented 5 years ago

Looks like #601 I setup this parameter to 3600 and still have events from 2hours, could it be a localtime or timezone issue? I've purged both from web interface. Can we purge thru API until it's fixed?

gotthardp commented 5 years ago

this is really weird, will have a look

the API allows you to delete all entries in a table (that's what the purge buttons do). simply HTTP DELETE /api/events, but be careful-- it deletes everything without any warning and any way to recover (that's why its not documented)

autodomain commented 5 years ago

:( Il mer 27 mar 2019, 16:10 Petr Gotthard notifications@github.com ha scritto:

this is really weird, will have a look

the API allows you to delete all entries in a table (that's what the purge buttons do). simply HTTP DELETE /api/events, but be careful-- it deletes everything without any warning and any way to recover (that's why its not documented)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gotthardp/lorawan-server/issues/606#issuecomment-477201053, or mute the thread https://github.com/notifications/unsubscribe-auth/ABdhaoypjwuxc_03538mI6Rl2Kl6G4scks5va4n_gaJpZM4bgk5f .

gotthardp commented 5 years ago

@hallard To further debug this issue I made the following updates to the latest master:

hallard commented 5 years ago

@gotthardp Thanks, I'll try this one setting both to 1800 to see, but not today, we need to finalise production by the end of day

hallard commented 5 years ago

@gotthardp

Looks like still not working for RX frames

    % amount of rxframes retained for each device/node
    {retained_rxframes, 10},
    % events duration on interface
    {event_lifetime, 1800},
    {trim_interval, 1800},

Frames pages 458 frames image

Most recent before image

Older before (2 days ago) image

Events looks better despite the fact there are 3 old events but all other are fine image

gotthardp commented 5 years ago

Concerning the events: please see the Last Occurred date. There are no old events.

gotthardp commented 5 years ago

Concerning the Frames: what you posted is not necessarily wrong, could you please (wait 1800 seconds after server start and then) filter out only one DevAddr? Is there a DevAddr that has more than a high number of old frames or not?

jot4p commented 4 years ago

Hi,

It's possible to remove all received frames, removing rxframe.DLC and rxframe.DCD ? Can I remove this with loraserver running ??

What is the best procedure ? Because my rxframes page does not load......

JoobyPM commented 1 year ago

Dear @gotthardp is it safe to remove rxframe.DLC and rxframe.DCD ? Or to configure retained_rxframes=0? Thank you for your reply.