Django makemigrations和迁移无法忍受缓慢/冻结

时间:2017-04-26 00:27:58

标签: python django amazon-web-services amazon-ec2

我正在使用Django 1.8.6进行一个小项目。它有大约5个小型号。当我在Mac上本地运行makemigrationsmigrate时,完成并将迁移应用到SQLite DB大约需要3-4秒。但是,当我尝试在生产服务器上执行相同的操作时,每个命令都会冻结。

以下是它冻结的地方:

Operations to perform:
  Synchronize unmigrated apps: staticfiles, sekizai, sortedm2m, mptt, absolute, aldryn_reversion, aldryn_common, messages, treebeard, emailit, aldryn_apphooks_config, aldryn_translation_tools, parler, aldryn_boilerplates, djangocms_admin_style
  Apply all migrations: djangocms_video, page_extensions, aldryn_forms, filer, email_notifications, aldryn_newsblog, djangocms_picture, aldryn_people, menus, djangocms_text_ckeditor, djangocms_link, sessions, djangocms_column, djangocms_googlemap, auth, djangocms_snippet, captcha, aldryn_bootstrap3, easy_thumbnails, admin, djangocms_file, cms, taggit, reversion, contenttypes, sites, social_icon, aldryn_categories, djangocms_style
Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
  Installing custom SQL...
Running migrations:
  Rendering model states...

为什么会这样?我该如何解决?如果有帮助,我将使用带有CentOS的EC2 AWS实例作为生产服务器。

0 个答案:

没有答案