PublishQueueAsyncRK repeated old data


I am using the PublishQueueAsyncRK (Winbond SPI flash) for all my publish events and up until today have had no problems with it. Today I noticed one of my remote devices was repeatedly sending an event from June 28th.

The device normally sends some sensor data, location data and timestamp at 2 minute intervals. The publish events were coming though at the correct interval, but the event data was always the same with the timestamp from June 28th. I don’t think it was the queue trying to push out stored events, I think the event data was being overwritten with old data before being sent out.

I tried clearQueue() followed by a system reset, but still had the same issue. I was able to get it working again, but I had to erase the SPI flash chip and then reset the device.

This is a remote device, so I don’t have any log data, but I was hoping someone has some insights or some info on where to start checking for the bug. I’m trying to recreate the issue on my desk, but have had no luck yet.

Hmm, I’m not sure about what this could be. @rickkas7 do you have any suggestions?

It’s impossible to say. I can’t rule out a bug in the Publish Queue. However, it could also be a bug in the SPIFFS implementation. I know there’s a bug in SPIFFS somewhere, because under stress testing it eventually will fail, but I can’t figure out why.

I’ve switched to using LittleFS because of it. I haven’t been able to make that fail, at least as easily.

1 Like

Thanks for the info.

Are there any public alternatives to the Publish Queue library that use LittleFS instead of SPIFFS? I’m sure I could put something together on my own, but it probably wouldn’t end up any more reliable than my current implementation.

FYI: I’m using Gen 3 devices.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.