mixpanel / mixpanel-node

A node.js API for mixpanel
http://www.mixpanel.com
MIT License
476 stars 159 forks source link

upstream connect error or disconnect/reset before headers #149

Open hphirke opened 5 years ago

hphirke commented 5 years ago

I am using mixpanel v0.10.1 Node version: v10.15.0 While updating profiles via this library I am getting below errors:

Mixpanel Server Error: upstream connect error or disconnect/reset before headers\n at IncomingMessage. (/home/ubuntu/app/HTMListen/backend/node_modules/mixpanel/lib/mixpanel-node.js:136:42)\n at IncomingMessage.emit (events.js:187:15)\n at IncomingMessage.EventEmitter.emit (domain.js:441:20)\n at endReadableNT (_stream_readable.js:1094:12)\n at process._tickCallback (internal/process/next_tick.js:63:19)","time":"2019-02-04T15:15:26.503Z","v":0}

jakobmulvad commented 5 years ago

Yay! I'm not the only one experiencing this! I have really been scratching my head.

I have been seeing this issue for at least a month now. There seems to be some kind of pattern to when this happens. It happens every midnight UTC and then again around 17:00 UTC.

Mixpanel version: I was seeing this in version 0.5.0 but upgrading to 0.10.1 did not fix it. Node version: v10.14.2 Stacktrace: same as above

hphirke commented 5 years ago

In my case its happening on: 12.00am UTC 5 am UTC 5.15pm UTC

Morikko commented 5 years ago

The problem is also happening since at least 3 months. Mostly between 16pm and 18pm UTC but sometimes it starts earlier.

hphirke commented 5 years ago

This happens frequently. I am not sure why Mixpanel devs are not even acknowledging the issue

Morikko commented 5 years ago

The CTO of my company contacted them. They answered those errors are part of their SLA overtaking (99.99) so they just don't care...

Le mar. 19 mars 2019 à 11:14, Himanshu Phirke notifications@github.com a écrit :

This happens frequently. I am not sure why Mixpanel devs are not even acknowledging the issue

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mixpanel/mixpanel-node/issues/149#issuecomment-474285132, or mute the thread https://github.com/notifications/unsubscribe-auth/AHeAFABrGq-3lRuwi4E8d4OmoKvLolHPks5vYLiegaJpZM4aim3y .

tdumitrescu commented 5 years ago

This doesn't sound like an issue specific to the nodejs SDK, but rather the data ingestion API, which is probably why you're not getting very efficient customer support here. That being said, it does seem somewhat unreasonable to expect SDK users to roll their own retry logic for cases when the API is temporarily unavailable; would it be helpful to have some retry configuration options built into the track() calls in this lib?

KnupMan commented 5 years ago

The same for me. Now it's happening very frequently, but error started to be another: Mixpanel Server Error: null. So it's more related to https://github.com/mixpanel/mixpanel-node/issues/152. @tdumitrescu it would be helpful to have retry logic, but only if we are sure that events are not getting tracked on mixpanel. At https://github.com/mixpanel/mixpanel-node/issues/152 @devendrawani says events are getting tracked.

Node 8.10 mixpanel-node 0.10.1

KnupMan commented 5 years ago

Just want to confirm that for me all events are getting tracked by Mixpanel (even those that had error in response).

tdumitrescu commented 5 years ago

@KnupMan do you know whether your events are still getting tracked when you get the "upstream connect error or disconnect/reset before headers" message or just the "null" one? In either case BTW Mixpanel's API now has deduplication features which allow safe retrying of track calls as long as they contain the same $insert_id and time props; see https://developer.mixpanel.com/docs/http#section-event-deduplication, so I think we can build the retry logic directly into this client.

KnupMan commented 5 years ago

@tdumitrescu I really don't know as I just realized, that my tracking lambda is retrying in 1 minute after Mixpanel error occurs and gets successfully tracked. Maybe it's the reason why my events are still getting tracked.

v1adko commented 4 years ago

We have the same issue, so it's ok to just ignore and retry? This is happening a lot lately

jooj123 commented 4 years ago

We are also getting this one - it happens alot and not sure why - anyone know what may be causing this ?

There doesnt seem to be anything special about what we are sending to mixpanel

jcurlier commented 3 years ago

+1

johnnymetz commented 2 years ago

+1