tomhaymore / prosperime

0 stars 0 forks source link

set_first_ideal_job fails during lilib.process_li_connections because of memory usage #5

Open tomhaymore opened 11 years ago

tomhaymore commented 11 years ago

[2013-06-25 21:55:16,567: ERROR/MainProcess] Task accounts.tasks.process_li_connections[5fa07b7c-9ee2-46f1-b21b-d93675b4ace4] raised exception: DatabaseError('out of memory\nDETAIL: Failed on request of size 48.\n',) 2013-06-26T04:55:16.570584+00:00 app[celeryd.1]: Traceback (most recent call last): 2013-06-26T04:55:16.570584+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/celery/task/trace.py", line 224, in trace_task 2013-06-26T04:55:16.570584+00:00 app[celeryd.1]: R = retval = fun(_args, _kwargs) 2013-06-26T04:55:16.570584+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/celery/task/trace.py", line 406, in protected_call 2013-06-26T04:55:16.570584+00:00 app[celeryd.1]: return self.run(_args, _kwargs) 2013-06-26T04:55:16.570584+00:00 app[celeryd.1]: File "/app/prosperime/accounts/tasks.py", line 35, in process_li_connections 2013-06-26T04:55:16.570584+00:00 app[celeryd.1]: li_cxn_parser.process_connections() 2013-06-26T04:55:16.570584+00:00 app[celeryd.1]: File "/app/prosperime/accounts/lilib.py", line 1012, in process_connections 2013-06-26T04:55:16.570584+00:00 app[celeryd.1]: careerlib.match_position_to_ideals(p) 2013-06-26T04:55:16.570766+00:00 app[celeryd.1]: File "/app/prosperime/careers/careerlib.py", line 38, in match_position_to_ideals 2013-06-26T04:55:16.570766+00:00 app[celeryd.1]: return career_map.match_position_to_ideals(pos,test) 2013-06-26T04:55:16.570766+00:00 app[celeryd.1]: File "/app/prosperime/careers/careerlib.py", line 1720, in match_position_to_ideals 2013-06-26T04:55:16.570766+00:00 app[celeryd.1]: pos.save() 2013-06-26T04:55:16.570766+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py", line 463, in save 2013-06-26T04:55:16.570766+00:00 app[celeryd.1]: self.save_base(using=using, force_insert=force_insert, force_update=force_update) 2013-06-26T04:55:16.570766+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py", line 565, in save_base 2013-06-26T04:55:16.570766+00:00 app[celeryd.1]: created=(not record_exists), raw=raw, using=using) 2013-06-26T04:55:16.570766+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 172, in send 2013-06-26T04:55:16.570766+00:00 app[celeryd.1]: response = receiver(signal=self, sender=sender, **named) 2013-06-26T04:55:16.570923+00:00 app[celeryd.1]: File "/app/prosperime/accounts/models.py", line 285, in update_first_ideal_job 2013-06-26T04:55:16.570923+00:00 app[celeryd.1]: instance.person.profile.set_first_ideal_job() 2013-06-26T04:55:16.570923+00:00 app[celeryd.1]: File "/app/prosperime/accounts/models.py", line 60, in set_first_ideal_job 2013-06-26T04:55:16.570923+00:00 app[celeryd.1]: for p in positions: 2013-06-26T04:55:16.570923+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/query.py", line 118, in _result_iter 2013-06-26T04:55:16.570923+00:00 app[celeryd.1]: self._fill_cache() 2013-06-26T04:55:16.570923+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/query.py", line 892, in _fill_cache 2013-06-26T04:55:16.570923+00:00 app[celeryd.1]: self._result_cache.append(self._iter.next()) 2013-06-26T04:55:16.570923+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/query.py", line 962, in iterator 2013-06-26T04:55:16.570923+00:00 app[celeryd.1]: for row in self.query.get_compiler(self.db).results_iter(): 2013-06-26T04:55:16.571318+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 763, in results_iter 2013-06-26T04:55:16.571318+00:00 app[celeryd.1]: for rows in self.execute_sql(MULTI): 2013-06-26T04:55:16.571318+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 818, in execute_sql 2013-06-26T04:55:16.571318+00:00 app[celeryd.1]: cursor.execute(sql, params) 2013-06-26T04:55:16.571318+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute 2013-06-26T04:55:16.571318+00:00 app[celeryd.1]: return self.cursor.execute(query, args) 2013-06-26T04:55:16.571318+00:00 app[celeryd.1]: DatabaseError: out of memory 2013-06-26T04:55:16.571318+00:00 app[celeryd.1]: DETAIL: Failed on request of size 48.

tomhaymore commented 11 years ago

I removed the "exclude" filter from the call, sometimes postgres throws up all over itself from this