mixpanel / mixpanel-utils

Other
85 stars 62 forks source link

Event Export killed #2

Closed glencwillis closed 6 years ago

glencwillis commented 6 years ago

Currently receiving a "Killed" response when trying to export ~3.5 million events.

Script:

from mixpanel_api import Mixpanel

mixpanel = Mixpanel('secret_here',token='token_here', debug = True)

mixpanel.export_events("Export.csv",{'from_date':'2017-07-15','to_date':'2017-07-31'},format='csv')

jaredmixpanel commented 6 years ago

@glencwillis sounds like your operating system is killing the process, probably because it's taking up too much memory on the machine. If you're not already running it on the expert box, you might want to try it there. You can also include the add_gzip_header=True parameter to your export_events call.

zeusstl commented 3 years ago

I am having the same problem. Seem to be running out of memory at 100MB (at which point the virtual memory used shoots really high really fast). The server has plenty of memory. Still using python 2.7.12 for this per the README.

DEBUG: Request Method: GET DEBUG: Request URL: https://data.mixpanel.com/api/2.0/export?from_date=2020-10-01&to_date=2021-02-01 DEBUG: Request Headers: {"Accept-encoding": "gzip", "Authorization": "Basic xxxxxxxhidden_for_sharingxxxx"}

"Out of memory: Kill process 27865 (python) score 495 or sacrifice child"

@glencwillis Were you able to solve this? @jaredmixpanel What is the expert box?