mysql - Memory error while importing IMDb files using IMDbPY script -


while importing imdb files mysql 5 using myisam storage engine getting following memory error:

traceback (most recent call last):   file "/usr/local/bin/imdbpy2sql.py", line 3072, in <module>     run()   file "/usr/local/bin/imdbpy2sql.py", line 2937, in run     readmovielist()   file "/usr/local/bin/imdbpy2sql.py", line 1531, in readmovielist     mid = cache_mid.addunique(title, yeardata)   file "/usr/local/bin/imdbpy2sql.py", line 1135, in addunique     else: return self.add(key, miscdata)   file "/usr/local/bin/imdbpy2sql.py", line 1010, in add     self[key] = c   file "/usr/local/bin/imdbpy2sql.py", line 922, in __setitem__     dict.__setitem__(self, key, counter) memoryerror 

this on ubuntu 14.0.4 ec2 instance on aws 1gb of memory. first tried using command:

imdbpy2sql.py --mysql-force-myisam -d /home/ubuntu/imdb-files/ -u mysql://admin:password@localhost/imdb 

and also:

imdbpy2sql.py --mysql-force-myisam -d /home/ubuntu/imdb-files/ -u mysql://admin:password@localhost/imdb -c /home/ubuntu/imdb-files/csv 

both failed same memory error. know of workaround?

update (6/20/2015):

it produces memory error @ same point. here mysql table status of title table populating.

| name | engine | version | row_format | rows | avg_row_length | data_length | max_data_length | index_length | data_free | auto_increment

| title | myisam | 10 | dynamic | 2699999 | 83 | 226543136 | 281474976710655 | 32410624 | 0 | 2700000

and memory usage of imdbpy2sql.py around 62%. not python pseron not sure how debug input appreciated.

i fear 1 gb of total ram not enough run imdbpy2sql.py safely. maybe can try on different instance or adding swap file system (it slow down).


Comments

Popular posts from this blog

python - How to create jsonb index using GIN on SQLAlchemy? -

PHP DOM loadHTML() method unusual warning -

c# - TransactionScope not rolling back although no complete() is called -