-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP response code 408 when using deliver (batch) #14
Comments
hey @chook - what are you POST-ing over to us here? my thought is that either the batch is too big (over 50 events) or that there's something malformed being sent over. it's also possible the data payload is empty, which could cause the server to timeout waiting for the data to be sent. any of this seem possible? feel free to email me directly at drew [at] mixpanel if you want to send over the actual event data. |
I've checked this, it appears we are sending data (not empty) and the data payload isn't too large. For a delivery of 29 people messages. Is it possible we are hitting your API too fast and you are throttling us, resulting in 408 responses? Furthermore, the way we do it is we add mixpanel changes we want to a queue, and have a daemon thread that drains it and send the requests - giving it the async nature we need. Is it possible the JSONObjects created by the library should be delivered close to the time they are created and the problem lies in the time they spend in the queue? |
This is great information! (thanks for catching the reference to the new issue!) |
My current suspicion is that the time required to encode and write the data in the library is too long. It shouldn't be an issue with the queue- the tracking endpoint should accept events up to five days old. My guess is that the time interval between opening the connection and writing data is too long. I'll try to reproduce it here. URLConnection conn = endpoint.openConnection();
// My *guess* is that we're doing too much work here for large deliveries
postStream = conn.getOutputStream();
postStream.write(encodedQuery.getBytes()); |
@joeatwork Follow-up; Were you able to reproduce this? |
thx @joeatwork - @JensRantil @ryanseams is going to take a look at this |
I'm getting:
java.io.IOException: Server returned HTTP response code: 408 for URL: http://api.mixpanel.com/track?ip=0
The text was updated successfully, but these errors were encountered: