offspot / imager-service

Create Kiwix Hotspot microSD cards online
https://imager.kiwix.org/
GNU General Public License v3.0
14 stars 6 forks source link

504 Gateway timeout when trying to reach Orders section #124

Closed Popolechien closed 5 years ago

Popolechien commented 5 years ago

This is not systematic - but more often than not on a single session.

Popolechien commented 5 years ago

Ah, here is a log: Environment: Request Method: GET Request URL: https://cardshop.hotspot.kiwix.org/all-orders/

Django Version: 2.2.4 Python Version: 3.7.4 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'manager'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback:

File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner

  1. response = get_response(request)

File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response

  1. response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response

  1. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view

  1. return view_func(request, *args, **kwargs)

File "./manager/views/all_orders.py" in list

  1. [OrderData(order) for order in as_items_or_none(*get_orders_list())],

Exception Type: TypeError at /all-orders/ Exception Value: 'NoneType' object is not iterable

rgaudin commented 5 years ago

Yes, I'm aware of this. Not sure there's a ticket though. It's a communication issue between the manager and the scheduler. thanks.

kelson42 commented 5 years ago

Checking for this kind of error should be covered by #114

rgaudin commented 5 years ago

this wouldn't show up in the health check as this is a bug in that this specific request takes to long to process/retrieve: manager works, scheduler works but this page's logic is buggy.