Hi,
I keep getting the following message in my debug console.
[Piwik] Tracker reach maximum number of queued events
I’m using the iOS SDK in iOS app in Swift. It causes the app to crash after some point.
Does anyone know how to fix this?
Hi Mia,
Here are couple of things:
-
It is unlikely that the application crashes due to reaching the limit of events in the queue. If you reach the limit, the SDK does literally nothing with such event, no logic with events over the available limit is executed. However, if you believe there is no other reason for the crash please let me know.
-
What does the application do and what does it send to the tracker if it is able to generate more than 500 events in 30 seconds (assuming that the there was no change in the default parameters of the SDK)? It will be useful to know for us to possibly improve our SDK. But in general, it’s hard for me to imagine, other than a bug in the logic, what to do to generate so many events in mobile app.
-
One suggestion is to change the default settings of the SDK, specifically to raise the maximum limit of queued events and to shorten the frequency of sending events to the tracker
PiwikTracker.sharedInstance()?.maxNumberOfQueuedEvents = 1000
PiwikTracker.sharedInstance()?.dispatchInterval = 5
The values in the code above are just an example, you must determine for yourself what values are optimal for this particular application
Best,
Oliwer