A
A
Alexander Pogodin2020-05-02 12:23:03
Django
Alexander Pogodin, 2020-05-02 12:23:03

Django hosting site crashed. Because of what it can be?

Good afternoon. When I go to the site, an error is shown: "We're sorry, but something went wrong.
The issue has been logged for investigation. Please try again later."

The following happens in the logs:

Logs

App 29941 output: /usr/share/passenger/helper-scripts/wsgi-loader.py:26: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
App 29941 output:   import sys, os, re, imp, threading, signal, traceback, socket, select, struct, logging, errno
App 29941 output: Traceback (most recent call last):
App 29941 output:   File "/usr/share/passenger/helper-scripts/wsgi-loader.py", line 369, in <module>
App 29941 output:     app_module = load_app()
App 29941 output:   File "/usr/share/passenger/helper-scripts/wsgi-loader.py", line 76, in load_app
App 29941 output:     return imp.load_source('passenger_wsgi', startup_file)
App 29941 output:   File "/opt/python/python-3.7.0/lib/python3.7/imp.py", line 171, in load_source
App 29941 output:     module = _load(spec)
App 29941 output:   File "<frozen importlib._bootstrap>", line 696, in _load
App 29941 output:   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
App 29941 output:   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
App 29941 output:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
App 29941 output:   File "/var/www/u0535492/data/www/pogodinrogov.com/passenger_wsgi.py", line 10, in <module>
App 29941 output:     application = get_wsgi_application()
App 29941 output:   File "/opt/python/python-3.7.0/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
App 29941 output:     django.setup(set_prefix=False)
App 29941 output:   File "/opt/python/python-3.7.0/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
App 29941 output:     apps.populate(settings.INSTALLED_APPS)
App 29941 output:   File "/opt/python/python-3.7.0/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
App 29941 output:     app_config.import_models()
App 29941 output:   File "/opt/python/python-3.7.0/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models
App 29941 output:     self.models_module = import_module(models_module_name)
App 29941 output:   File "/opt/python/python-3.7.0/lib/python3.7/importlib/__init__.py", line 127, in import_module
App 29941 output:     return _bootstrap._gcd_import(name[level:], package, level)
App 29941 output:   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
App 29941 output:   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
App 29941 output:   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
App 29941 output:   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
App 29941 output:   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
App 29941 output:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
App 29941 output:   File "/var/www/u0535492/data/www/pogodinrogov.com/main/models.py", line 2, in <module>
App 29941 output:     from markupfield.fields import MarkupField
App 29941 output:   File "/var/www/u0535492/data/prgenv/lib/python3.7/site-packages/markupfield/fields.py", line 8, in <module>
App 29941 output:     from markupfield import markup
App 29941 output:   File "/var/www/u0535492/data/prgenv/lib/python3.7/site-packages/markupfield/markup.py", line 2, in <module>
App 29941 output:     
App 29941 output: from django.utils.functional import curry
App 29941 output: ImportError
App 29941 output: : cannot import name 'curry' from 'django.utils.functional' (/opt/python/python-3.7.0/lib/python3.7/site-packages/django/utils/functional.py)
App 29941 output: 
[ E 2020-05-01 22:55:58.1229 2816/T26 age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/u0535492/data/www/pogodinrogov.com: The application process exited prematurely.
  Error ID: 34162ad6
  Error details saved to: /tmp/passenger-error-pGxC27.html
 
[ E 2020-05-01 22:55:58.1600 2816/Tf age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 5-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 34162ad6. Please see earlier logs for details about the error.
App 29996 output: /usr/share/passenger/helper-scripts/wsgi-loader.py:26: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
App 29996 output:   import sys, os, re, imp, threading, signal, traceback, socket, select, struct, logging, errno
App 29996 output: Traceback (most recent call last):
App 29996 output:   File "/usr/share/passenger/helper-scripts/wsgi-loader.py", line 369, in <module>
App 29996 output:     app_module = load_app()
App 29996 output:   File "/usr/share/passenger/helper-scripts/wsgi-loader.py", line 76, in load_app
App 29996 output:     return imp.load_source('passenger_wsgi', startup_file)
App 29996 output:   File "/opt/python/python-3.7.0/lib/python3.7/imp.py", line 171, in load_source
App 29996 output:     module = _load(spec)
App 29996 output:   File "<frozen importlib._bootstrap>", line 696, in _load
App 29996 output:   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
App 29996 output:   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
App 29996 output:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
App 29996 output:   File "/var/www/u0535492/data/www/pogodinrogov.com/passenger_wsgi.py", line 10, in <module>
App 29996 output:     application = get_wsgi_application()
App 29996 output:   File "/opt/python/python-3.7.0/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
App 29996 output:     django.setup(set_prefix=False)
App 29996 output:   File "/opt/python/python-3.7.0/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
App 29996 output:     
App 29996 output: apps.populate(settings.INSTALLED_APPS)
App 29996 output:   File "/opt/python/python-3.7.0/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
App 29996 output:     app_config.import_models()
App 29996 output:   File "/opt/python/python-3.7.0/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models
App 29996 output:     self.models_module = import_module(models_module_name)
App 29996 output:   File "/opt/python/python-3.7.0/lib/python3.7/importlib/__init__.py", line 127, in import_module
App 29996 output:     return _bootstrap._gcd_import(name[level:], package, level)
App 29996 output:   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
App 29996 output:   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
App 29996 output:   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
App 29996 output:   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
App 29996 output:   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
App 29996 output:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
App 29996 output:   File "/var/www/u0535492/data/www/pogodinrogov.com/main/models.py", line 2, in <module>
App 29996 output:     
App 29996 output: from markupfield.fields import MarkupField
App 29996 output:   File "/var/www/u0535492/data/prgenv/lib/python3.7/site-packages/markupfield/fields.py", line 8, in <module>
App 29996 output:     
App 29996 output: from markupfield import markup
App 29996 output:   File "/var/www/u0535492/data/prgenv/lib/python3.7/site-packages/markupfield/markup.py", line 2, in <module>
App 29996 output:     
App 29996 output: from django.utils.functional import curry
App 29996 output: ImportError
App 29996 output: : 
App 29996 output: cannot import name 'curry' from 'django.utils.functional' (/opt/python/python-3.7.0/lib/python3.7/site-packages/django/utils/functional.py)
[ E 2020-05-01 22:55:58.8530 2816/T2b age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/u0535492/data/www/pogodinrogov.com: The application process exited prematurely.
  Error ID: 420db0e6
  Error details saved to: /tmp/passenger-error-4yIIF4.html
 
[ E 2020-05-01 22:55:58.8883 2816/Th age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 6-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 420db0e6. Please see earlier logs for details about the error.



Swears that it cannot import curry from django.utils.functional. I found in Google that the problem occurs when updating django to 3. It is not clear how such an error suddenly appeared if I did not update Django and did not touch the site at all. Tell me where to dig :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-05-02
@bacon

Who updated then? You are explicitly told
App 29996 output: from django.utils.functional import curry
App 29996 output: ImportError
no need to mindlessly hit the django version https://docs.djangoproject.com/en/3.0/releases/3.0...
So, or return the version under which your code is tested, or update your code to django3
PS I just noticed the Reg.ru tag, if it's not VDS, but just "some kind of hosting" django, then SSZB.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question