File Storage Full error

My experience with the cellular Notecards over the last 18 months is that they are exceptionally reliable (so far). This is a real credit to the team at Blues, thank you!
Recently however, I had a faulty unit returned from the field where the Notecard would sync and send _session.qo and env.dbs files, but not my notes (with data). In testing, I found that the Notecard was returning a “{file-storage-full}” error when adding a note. My understanding was that notes were deleted once sync’d? Even if many notes were added during a period of poor connectivity, wouldn’t the file system be cleared on subsequent syncs, or at the very least, a power cycle? This appears not to have happened. I had to perform a {“req”:“card.restore”,“delete”:true} to clear the file system. I was using FW version 4.2.1.4015688. Can anyone shed some more light on this issue? I have read a similar post here, but still don’t understand why the file system didn’t clear on many subsequent syncs. Any insights appreciated.
Ray

Hi @rberkelm,

By design, the Notecard will delete outbound (.qo) Notefiles once synced with Notehub. Are you using db/dbs/dbx (a.k.a. database) Notefiles by any chance?

For reference:

  • Notes in db/dbs/dbx Notefiles are not deleted, but they are limited to 100 Notes (this is unlikely the issue unless you are using extremely large payloads).
  • As mentioned, outbound Notes in qo/qos files are auto-deleted once sent, and are limited to 100 Notes unless you’re using Notefile Templates (which I always recommend!).
  • Inbound Notes in qi/qis files are only deleted once you remove them with note.get delete:true request.

FYI, if you use the Notecard CLI, you can use the notecard -explore -reserved command to see what is on the local Notecard.

Hope that helps!
Rob

Thanks Rob,
The notes were all .qo type. After looking closely at the data, I think what happened was that the device got accidentally switched on in transit on its way to the customer with no antenna attached. Some connections were made (somehow), but eventually that stopped while notes continued to be collected, eventually filling up the file system. Could the file system get so full that it prevents them being downloaded upon a sync? I wonder if that might indicate a bug in the FW?

Hi @rberkelm,

Could the file system get so full that it prevents them being downloaded upon a sync?

It certainly should not. Can you post an example note.add request with the full body/payload here? I’d love to try some tests where I max out a Notecard with data to see if I can replicate this on your particular version of Notecard firmware.

Rob

Hi @RobLauer
The notes being sent looked like this:
{“req”:“note.add”,“file”:“data.qo”,“body”:{“weight”:54.9,“bat”:4.01, “soc”:92.6,“temp”:25.3,“offset”:2354,“slope”:1.1,“netrawwt”:2754427,“key”:“XXXXXXXXBBMJM1AA”}}

Hi @rberkelm,

I just ran a test on a fresh Notecard with 4.2.1 installed. I disconnected the antenna, added 100 Notes per above, reconnected the antenna, and all the data was synced and cleared out from the Notecard. So fortunately/unfortunately I wasn’t able to replicate the issue manually.

FYI, there is a command in the in-browser terminal called “explore” that lets you inspect Notefiles:

> explore
~ 1 Notefiles
~  File      Notes   Type           
~  data.qo           Outgoing Queue 
> explore data.qo
~ data.qo: 0 Notes

Thanks @RobLauer,
Hopefully that was a one-off. I’ll keep an eye out for any other occurrences and if it happens again I’ll check with you before doing a restore. Thanks for your help!