我正在使用Django 1.8.6进行一个小项目。它有大约5个小型号。当我在Mac上本地运行makemigrations
和migrate
时,完成并将迁移应用到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实例作为生产服务器。