amplitude / Amplitude-Node

Server-side Node.js SDK for Amplitude
MIT License
67 stars 20 forks source link

Error on Timeout #101

Open t0mstah opened 3 years ago

t0mstah commented 3 years ago

Expected Behavior

Unexpected error on Timeout when calling Amplitude logEvent.

Current Behavior

    at Timeout._onTimeout (/workspace/node_modules/@amplitude/utils/dist/src/queue.js:67:48)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10) 

Possible Solution

Didn't happen in previous SDKs. Looks like there were some recent code changes to that queue.js file.

Steps to Reproduce

Happens occasionally on calls to logEvent.

Environment

axelvaindal commented 3 years ago

I have the same bug and it affects approximately 25% of my logs when we log approximately 300k events per day only on this call.

I'll roll back to a previous version to see if it helps.

t0mstah commented 3 years ago

Bug is only in new version. Temp fix is to roll back to older version.

ajhorst commented 3 years ago

@tfang17 we released v1.5.4 earlier this week with fixes to the timeout logic. When you have a chance, upgrade to that version and let me know if you're still seeing timeout issues