I am upgrading hue to 4.1.0. During the process, "migrate' is failing with OOM exception. Increasing memory is a very cumbersome process and it has to go through the different process. Is there a way to fix the problem other than increasing memory?
[hue@usw2prdpgw03 hue]$ build/env/bin/hue migrate
/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/cryptography-1.3.1-py2.6-linux-x86_64.egg/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
DeprecationWarning
Running migrations for django_extensions:
- Nothing to migrate.
- Loading initial data for django_extensions.
Installed 0 object(s) from 0 fixture(s)
Running migrations for desktop:
- Migrating forwards to 0026_change_is_trashed_default_to_false.
> desktop:0025_auto__add_field_document2_is_trashed
FATAL ERROR - The following SQL query failed: ALTER TABLE `desktop_document2` ADD COLUMN `is_trashed` bool NULL;
The error was: (1041, "Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space")
! Error found during real run of migration! Aborting.
! Since you have a database that does not support running
! schema-altering statements in transactions, we have had
! to leave it in an interim state between migrations.
! You *might* be able to recover with: - no dry run output for delete_foreign_key() due to dynamic DDL, sorry
= ALTER TABLE `desktop_document2` DROP COLUMN `is_trashed` CASCADE; []
! The South developers regret this has happened, and would
! like to gently persuade you to consider a slightly
! easier-to-deal-with DBMS (one that supports DDL transactions)
! NOTE: The error which caused the migration to fail is further up.
Error in migration: desktop:0025_auto__add_field_document2_is_trashed
Traceback (most recent call last):
File "build/env/bin/hue", line 11, in <module>
load_entry_point('desktop', 'console_scripts', 'hue')()
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/desktop/core/src/desktop/manage_entry.py", line 59, in entry
execute_from_command_line(sys.argv)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/South-1.0.2-py2.6.egg/south/management/commands/migrate.py", line 111, in handle
ignore_ghosts = ignore_ghosts,
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/South-1.0.2-py2.6.egg/south/migration/__init__.py", line 220, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/South-1.0.2-py2.6.egg/south/migration/migrators.py", line 256, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, database)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/South-1.0.2-py2.6.egg/south/migration/migrators.py", line 331, in migrate_many
result = self.migrate(migration, database)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/South-1.0.2-py2.6.egg/south/migration/migrators.py", line 133, in migrate
result = self.run(migration, database)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/South-1.0.2-py2.6.egg/south/migration/migrators.py", line 114, in run
return self.run_migration(migration, database)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/South-1.0.2-py2.6.egg/south/migration/migrators.py", line 84, in run_migration
migration_function()
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/South-1.0.2-py2.6.egg/south/migration/migrators.py", line 60, in <lambda>
return (lambda: direction(orm))
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/desktop/core/src/desktop/migrations/0025_auto__add_field_document2_is_trashed.py", line 14, in forwards
keep_default=False)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/South-1.0.2-py2.6.egg/south/db/generic.py", line 47, in _cache_clear
return func(self, table, *args, **opts)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/South-1.0.2-py2.6.egg/south/db/generic.py", line 418, in add_column
self.execute(sql)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/South-1.0.2-py2.6.egg/south/db/generic.py", line 282, in execute
cursor.execute(sql, params)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/utils.py", line 99, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/mysql/base.py", line 124, in execute
return self.cursor.execute(query, args)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/MySQL_python-1.2.5-py2.6-linux-x86_64.egg/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/mnt/data/apps/hue/hue_4.1.0_install/hue/build/env/lib/python2.6/site-packages/MySQL_python-1.2.5-py2.6-linux-x86_64.egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
django.db.utils.OperationalError: (1041, "Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space")