Search Unity

Why am I receiving AnalyticsResult.TooManyRequests for any analytics custom event?

Discussion in 'Unity Analytics' started by ajhatch, Nov 18, 2016.

  1. ajhatch

    ajhatch

    Joined:
    Oct 21, 2016
    Posts:
    7
    Regardless of what event I call, even something as simple as calling a custom event at the end of a single method that runs once sends a message to the debug log "TooManyRequests."

    After reviewing Unity's [extensive documentation][1] on this error, I'm asking for help. Has anyone encountered this problem? What is the solution? I was able to get a few custom events to show up in the "play to validate" field but literally only one call each, and they haven't worked since. I get the feeling I have screwed something up implementation wise but I am struggling to find anything online.


    [1]: https://docs.unity3d.com/ScriptReference/Analytics.AnalyticsResult.TooManyRequests.html
     
  2. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    TooManyRequests is an indication that the Unity Analytics SDK thinks your device has fired off too many events in the past hour (by default the limit is 100 events/device/hour).

    Is it possible that you've accidentally fired off a bunch of events in quick succession? This could happen if you put an event inside an Update loop, or hit something repeatedly while testing, or are doing an event every time a common object is instantiated. You can just wait an hour and try again. But obviously if there *is* an actual overrun, it'll just reoccur unless you find the offender and fix it.

    Hope that helps!
     
    erika_d likes this.
  3. ajhatch

    ajhatch

    Joined:
    Oct 21, 2016
    Posts:
    7
    This was in fact my problem! I didn't realize it was an hourly per user limit on requests, so even though I fixed the issue the first time I called an event every frame by accident it continued to cause the error message until an hour passed.
     
    marc_tanenbaum likes this.