我在使用 cPanel 部署 Django 应用程序时遇到问题。
我正在使用 Python 3.6 和 Django 3.1,创建了我的 virtualenv,在我的目录中运行 pip install -r requirements.txt
,
为生产配置了我的 settings.py
。
运行 python manage.py makemigrations
后,出现以下错误
OpenBLAS blas_thread_init: pthread_create failed for thread 32 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 33 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 34 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 35 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 36 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 37 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 38 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 39 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 40 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 41 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 42 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 43 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 44 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 45 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 46 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 47 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 48 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 49 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 50 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 51 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 52 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 53 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 54 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
OpenBLAS blas_thread_init: pthread_create failed for thread 55 of 56: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 35 current, 35 max
Traceback (most recent call last):
File "manage.py", line 23, in <module>
main()
File "manage.py", line 20, in main
execute_from_command_line(sys.argv)
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/core/management/base.py", line 368, in execute
self.check()
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/core/management/base.py", line 396, in check
databases=databases,
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/core/checks/registry.py", line 70, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/urls/resolvers.py", line 589, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/urls/resolvers.py", line 582, in urlconf_module
return import_module(self.urlconf_name)
File "/home/timeombh/virtualenv/exfi/3.7/lib64/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/timeombh/exfi/configurations/urls.py", line 16, in <module>
path("", include("app.urls")), # add this
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/django/urls/conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "/home/timeombh/virtualenv/exfi/3.7/lib64/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/timeombh/exfi/app/urls.py", line 10, in <module>
from . import views
File "/home/timeombh/exfi/app/views.py", line 447, in <module>
import pandas as pd
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/pandas/__init__.py", line 11, in <module>
__import__(dependency)
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/numpy/__init__.py", line 140, in <module>
from . import core
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/numpy/core/__init__.py", line 22, in <module>
from . import multiarray
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/numpy/core/multiarray.py", line 12, in <module>
from . import overrides
File "/home/timeombh/virtualenv/exfi/3.7/lib/python3.7/site-packages/numpy/core/overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
KeyboardInterrupt
Segmentation fault
我不知道为什么会出现此错误。我从来没有在我的本地系统上遇到过这个问题,我之前在 Heroku 上部署过,但从来没有遇到过这个问题。
我使用的是共享主机。
cPanel 真的适合托管 Django 应用程序吗?因为我正在使用不同的软件包,这些软件包可能依赖于 C,并且将来可能会添加更多功能。