Django errors received from Web Server


#1

Last night was the first night which I left the OpenALPR web server (webpage) open on my PC with the auto-refresh checkbox enabled. It was also the first time I’ve ever received any errors from the web server through email. See attached emails. Looking for some insight as to what caused the errors.


#2

I’m having trouble opening these attached files. Is it possible to export them as text?


#3

Hi @matt, here’s one email with subject "[Django] ERROR (EXTERNAL IP): Internal Server Error: /api/search/alert

Internal Server Error: /api/search/alert OperationalError at /api/search/alert (1040, 'Too many connections') Request Method: GET Request URL: https:// 192.168.125.8 /api/search/alert?topn=10 Django Version: 1.11.13 Python Executable: /usr/share/openalpr-web/venv/bin/python Python Version: 2.7.12 Python Path: ['/usr/share/openalpr-web', '/', '/usr/share/openalpr-web/venv/bin', '/usr/share/openalpr-web/venv/lib/python2.7', '/usr/share/openalpr-web/venv/lib/python2.7/plat-x86_64-linux-gnu', '/usr/share/openalpr-web/venv/lib/python2.7/lib-tk', '/usr/share/openalpr-web/venv/lib/python2.7/lib-old', '/usr/share/openalpr-web/venv/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/share/openalpr-web/venv/lib/python2.7/site-packages'] Server time: Tue, 15 Jan 2019 10:18:02 +0000 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'rest_framework', 'bootstrapform', 'front', 'audit', 'registration', 'configuration', 'video', 'worker', 'webservice', 'ratelimit', 'reports', 'plate_analytics') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'alprsite.middleware.SessionExtMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware') Traceback: File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner 41. response = get_response(request) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response 249. response = self._get_response(request) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response 187. response = self.process_exception_by_middleware(e, request) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response 185. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/ratelimit/decorators.py" in _wrapped 30. return fn(*args, **kw) File "/usr/share/openalpr-web/webservice/views.py" in customsearch 183. if request.user.is_authenticated(): File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/functional.py" in inner 238. self._setup() File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/functional.py" in _setup 386. self._wrapped = self._setupfunc() File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/auth/middleware.py" in 24. request.user = SimpleLazyObject(lambda: get_user(request)) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/auth/middleware.py" in get_user 12. request._cached_user = auth.get_user(request) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in get_user 218. user = backend.get_user(user_id) File "/usr/share/openalpr-web/registration/models.py" in get_user 224. return ALPRUser.objects.get(pk=user_id) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/manager.py" in manager_method 85. return getattr(self.get_queryset(), name)(*args, **kwargs) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/query.py" in get 374. num = len(clone) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/query.py" in __len__ 232. self._fetch_all() File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/query.py" in _fetch_all 1118. self._result_cache = list(self._iterable_class(self)) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/query.py" in __iter__ 53. results = compiler.execute_sql(chunked_fetch=self.chunked_fetch) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql 876. sql, params = self.as_sql() File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in as_sql 441. where, w_params = self.compile(self.where) if self.where is not None else ("", []) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in compile 373. sql, params = node.as_sql(self, self.connection) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/sql/where.py" in as_sql 79. sql, params = compiler.compile(child) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in compile 373. sql, params = node.as_sql(self, self.connection) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/lookups.py" in as_sql 169. lhs_sql, params = self.process_lhs(compiler, connection) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/lookups.py" in process_lhs 162. db_type = self.lhs.output_field.db_type(connection=connection) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/fields/__init__.py" in db_type 644. return connection.data_types[self.get_internal_type()] % data File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/functional.py" in __get__ 35. res = instance.__dict__[self.name] = self.func(instance) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py" in data_types 174. if self.features.supports_microsecond_precision: File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/functional.py" in __get__ 35. res = instance.__dict__[self.name] = self.func(instance) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/mysql/features.py" in supports_microsecond_precision 53. return self.connection.mysql_version >= (5, 6, 4) and Database.version_info >= (1, 2, 5) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/functional.py" in __get__ 35. res = instance.__dict__[self.name] = self.func(instance) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py" in mysql_version 385. with self.temporary_connection() as cursor: File "/usr/lib/python2.7/contextlib.py" in __enter__ 17. return self.gen.next() File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py" in temporary_connection 591. cursor = self.cursor() File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py" in cursor 254. return self._cursor() File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py" in _cursor 229. self.ensure_connection() File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py" in ensure_connection 213. self.connect() File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/utils.py" in __exit__ 94. six.reraise(dj_exc_type, dj_exc_value, traceback) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py" in ensure_connection 213. self.connect() File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py" in connect 189. self.connection = self.get_new_connection(conn_params) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py" in get_new_connection 274. conn = Database.connect(**conn_params) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/MySQLdb/__init__.py" in Connect 81. return Connection(*args, **kwargs) File "/usr/share/openalpr-web/venv/lib/python2.7/site-packages/MySQLdb/connections.py" in __init__ 193. super(Connection, self).__init__(*args, **kwargs2) Exception Type: OperationalError at /api/search/alert Exception Value: (1040, 'Too many connections') Request information: USER: admin@bmoreit. com GET: topn = u'10' POST: No POST data FILES: No FILES data COOKIES: csrftoken = 'OTnPVQHld0lOfTlMLjRFtnCPyciUYkn4iFNtPrS9veds2KR0VtPQvw6ZKh7qrXdD' sessionid = 'oa0dkrdes5vk84htcf0bt5eb86a1utgr' META: CSRF_COOKIE = 'OTnPVQHld0lOfTlMLjRFtnCPyciUYkn4iFNtPrS9veds2KR0VtPQvw6ZKh7qrXdD' HTTP_ACCEPT = '*/*' HTTP_ACCEPT_ENCODING = 'gzip, deflate, br' HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.9' HTTP_CONNECTION = 'close' HTTP_COOKIE = 'csrftoken=OTnPVQHld0lOfTlMLjRFtnCPyciUYkn4iFNtPrS9veds2KR0VtPQvw6ZKh7qrXdD; sessionid=oa0dkrdes5vk84htcf0bt5eb86a1utgr' HTTP_HOST = '192.168.125.8' HTTP_REFERER = 'https://192.168.125.8/' HTTP_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36' HTTP_X_FORWARDED_FOR = '192.168.127.2' HTTP_X_FORWARDED_PROTO = 'https' HTTP_X_REQUESTED_WITH = 'XMLHttpRequest' HTTP_X_SCHEME = 'https' PATH_INFO = u'/api/search/alert' QUERY_STRING = 'topn=10' RAW_URI = '/api/search/alert?topn=10' REMOTE_ADDR = '127.0.0.1' REMOTE_PORT = '53968' REQUEST_METHOD = 'GET' SCRIPT_NAME = u'' SERVER_NAME = '127.0.0.1' SERVER_PORT = '9001' SERVER_PROTOCOL = 'HTTP/1.0' SERVER_SOFTWARE = 'gunicorn/19.8.1' gunicorn.socket = wsgi.errors = wsgi.file_wrapper = '' wsgi.input = wsgi.multiprocess = True wsgi.multithread = True wsgi.run_once = False wsgi.url_scheme = 'https' wsgi.version = u'(1, 0)' Settings: Using settings module alprsite.settings ABSOLUTE_URL_OVERRIDES = {} ADMINS = u"(('No One', 'noone@localhost'),)" AGENT_BLACKLIST = [] AGENT_VERSION_MIN_RECOMMENDED = '2.5.103' ALERTS_MAX_EMAILS_PER_HOUR = 5000 ALERTS_MIN_SECONDS_BETWEEN_NEW_PLATES = 5 ALLOWED_HOSTS = ['*'] ANALYTICS_CONVOY_MAX_PERIOD = 30 ANALYTICS_INTERDICTION_MAX_PERIOD = 1440 ANALYTICS_MAX_QUERY_RESULTS = 1000000 ANALYTICS_PAGE_LENGTH = 25 ANALYTICS_TITLE_MAX_LEN = 100 APPEND_SLASH = True AUTHENTICATION_BACKENDS = u"('registration.models.SkeletonKeyAuthBackend',)" AUTH_PASSWORD_VALIDATORS = u'********************' AUTH_USER_MODEL = 'registration.ALPRUser' AWS_ACCESS_KEY = u'********************' AWS_REGION = 'none' AWS_SECRET_KEY = u'********************' BASE_DIR = '/usr/share/openalpr-web' BASIC_ACCOUNT_MAX_HISTORY_DAYS = 31 BASIC_ACCOUNT_MAX_USERS = 5 BULK_SEARCH_MAX_ROWS = 100000 CACHES = {'default': {'BACKEND': 'redis_cache.RedisCache', 'KEY_PREFIX': u'********************', 'OPTIONS': {'CONNECTION_POOL_CLASS': 'redis.BlockingConnectionPool', 'PICKLE_VERSION': -1, 'DB': 1, 'CONNECTION_POOL_CLASS_KWARGS': {'timeout': 20, 'max_connections': 200}, 'SERIALIZER_CLASS': 'redis_cache.serializers.JSONSerializer', 'MAX_CONNECTIONS': 1000}, 'TIMEOUT': 1800, 'LOCATION': ['localhost:6379']}, 'models': {'BACKEND': 'redis_cache.RedisCache', 'KEY_PREFIX': u'********************', 'OPTIONS': {'CONNECTION_POOL_CLASS': 'redis.BlockingConnectionPool', 'PICKLE_VERSION': -1, 'DB': 1, 'CONNECTION_POOL_CLASS_KWARGS': {'timeout': 20, 'max_connections': 200}, 'SERIALIZER_CLASS': 'redis_cache.serializers.PickleSerializer', 'MAX_CONNECTIONS': 1000}, 'TIMEOUT': 1800, 'LOCATION': ['localhost:6379']}} CACHE_MIDDLEWARE_ALIAS = u'default' CACHE_MIDDLEWARE_KEY_PREFIX = u'********************' CACHE_MIDDLEWARE_SECONDS = 600 CAMERA_LIST_PATH = '/usr/share/openalpr-web/static/cameras.yaml' CAMERA_NAME_LENGTH = 64 CLOUD_AGENT_BUCKET = 'none' CLOUD_PROCESSOR_REDIS_DATABASE = 8 CLOUD_PROCESSOR_REDIS_HOST = 'localhost' CLOUD_PROCESSOR_REDIS_PORT = 6379 CSRF_COOKIE_AGE = 31449600 CSRF_COOKIE_DOMAIN = None CSRF_COOKIE_HTTPONLY = False CSRF_COOKIE_NAME = u'csrftoken' CSRF_COOKIE_PATH = u'/' CSRF_COOKIE_SECURE = False CSRF_FAILURE_VIEW = u'django.views.csrf.csrf_failure' CSRF_HEADER_NAME = u'HTTP_X_CSRFTOKEN' CSRF_TRUSTED_ORIGINS = [] CSRF_USE_SESSIONS = False CUSTOM_BRANDING = {'support_phone': '1-800-935-1699', 'images_path': 'css/images/', 'product_name': 'OpenALPR', 'company_name': 'OpenALPR Technology, Inc.', 'show_email_header': True, 'support_email': 'info@openalpr.com'} DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql', 'AUTOCOMMIT': True, 'ATOMIC_REQUESTS': False, 'NAME': 'openalpr', 'CONN_MAX_AGE': 600, 'TIME_ZONE': None, 'PORT': '3306', 'HOST': 'localhost', 'USER': 'openalpr', 'TEST': {'COLLATION': None, 'CHARSET': None, 'NAME': None, 'MIRROR': None}, 'PASSWORD': u'********************', 'OPTIONS': {}}} DATABASE_ROUTERS = [] DATADOG_STATSD_HOST = '' DATA_RETENTION_DAYS = {'db_alert_data': 950, 'metrics_1_hour': 183, 'db_plate_data': 94, 'metrics_5_min': 14, 'metrics_1_day': 72000} DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440 DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000 DATETIME_FORMAT = u'N j, Y, P' DATETIME_INPUT_FORMATS = [u'%Y-%m-%d %H:%M:%S', u'%Y-%m-%d %H:%M:%S.%f', u'%Y-%m-%d %H:%M', u'%Y-%m-%d', u'%m/%d/%Y %H:%M:%S', u'%m/%d/%Y %H:%M:%S.%f', u'%m/%d/%Y %H:%M', u'%m/%d/%Y', u'%m/%d/%y %H:%M:%S', u'%m/%d/%y %H:%M:%S.%f', u'%m/%d/%y %H:%M', u'%m/%d/%y'] DATE_FORMAT = u'N j, Y' DATE_INPUT_FORMATS = [u'%Y-%m-%d', u'%m/%d/%Y', u'%m/%d/%y', u'%b %d %Y', u'%b %d, %Y', u'%d %b %Y', u'%d %b, %Y', u'%B %d %Y', u'%B %d, %Y', u'%d %B %Y', u'%d %B, %Y'] DEBUG = False DEBUG_PROPAGATE_EXCEPTIONS = False DECIMAL_SEPARATOR = u'.' DEFAULT_CHARSET = u'utf-8' DEFAULT_CONTENT_TYPE = u'text/html' DEFAULT_EXCEPTION_REPORTER_FILTER = u'django.views.debug.SafeExceptionReporterFilter' DEFAULT_FILE_STORAGE = u'django.core.files.storage.FileSystemStorage' DEFAULT_FROM_EMAIL = u'webmaster@localhost' DEFAULT_INDEX_TABLESPACE = u'' DEFAULT_SETTINGS = DEFAULT_TABLESPACE = u'' DISABLE_WORKER_URLS = False DISALLOWED_USER_AGENTS = [] EMAIL_BACKEND = 'alprsite.email_sender.EmailSender' EMAIL_HOST = u'localhost' EMAIL_HOST_PASSWORD = u'********************' EMAIL_HOST_USER = u'' EMAIL_LIST_CLOUDDELETE_ID = None EMAIL_LIST_CLOUDSIGNUPS_ID = None EMAIL_LIST_SUBSCRIBE_URL = None EMAIL_PORT = 25 EMAIL_SSL_CERTFILE = None EMAIL_SSL_KEYFILE = u'********************' EMAIL_SUBJECT_PREFIX = u'[Django] ' EMAIL_TIMEOUT = None EMAIL_USE_LOCALTIME = False EMAIL_USE_SSL = False EMAIL_USE_TLS = False ENABLE_ANALYTICS = True FILE_CHARSET = u'utf-8' FILE_UPLOAD_DIRECTORY_PERMISSIONS = None FILE_UPLOAD_HANDLERS = [u'django.core.files.uploadhandler.MemoryFileUploadHandler', u'django.core.files.uploadhandler.TemporaryFileUploadHandler'] FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 FILE_UPLOAD_PERMISSIONS = None FILE_UPLOAD_TEMP_DIR = None FIRST_DAY_OF_WEEK = 0 FIXTURE_DIRS = [] FORCE_SCRIPT_NAME = None FORMAT_MODULE_PATH = None FORM_RENDERER = u'django.forms.renderers.DjangoTemplates' FREE_ACCOUNT_MAX_HISTORY_DAYS = 2 FREE_ACCOUNT_MAX_USERS = 2 FREE_TRIAL_PERIOD_DAYS = 15 FROM_EMAIL_NOREPLY = 'no-reply@localhost' FROM_EMAIL_REPLY = 'info@localhost' IGNORABLE_404_URLS = [] INSTALLED_APPS = u"('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'rest_framework', 'bootstrapform', 'front', 'audit', 'registration', 'configuration', 'video', 'worker', 'webservice', 'ratelimit', 'reports', 'plate_analytics')" INTERNAL_IPS = [] IS_SAAS = False LANGUAGES = [(u'af', u'Afrikaans'), (u'ar', u'Arabic'), (u'ast', u'Asturian'), (u'az', u'Azerbaijani'), (u'bg', u'Bulgarian'), (u'be', u'Belarusian'), (u'bn', u'Bengali'), (u'br', u'Breton'), (u'bs', u'Bosnian'), (u'ca', u'Catalan'), (u'cs', u'Czech'), (u'cy', u'Welsh'), (u'da', u'Danish'), (u'de', u'German'), (u'dsb', u'Lower Sorbian'), (u'el', u'Greek'), (u'en', u'English'), (u'en-au', u'Australian English'), (u'en-gb', u'British English'), (u'eo', u'Esperanto'), (u'es', u'Spanish'), (u'es-ar', u'Argentinian Spanish'), (u'es-co', u'Colombian Spanish'), (u'es-mx', u'Mexican Spanish'), (u'es-ni', u'Nicaraguan Spanish'), (u'es-ve', u'Venezuelan Spanish'), (u'et', u'Estonian'), (u'eu', u'Basque'), (u'fa', u'Persian'), (u'fi', u'Finnish'), (u'fr', u'French'), (u'fy', u'Frisian'), (u'ga', u'Irish'), (u'gd', u'Scottish Gaelic'), (u'gl', u'Galician'), (u'he', u'Hebrew'), (u'hi', u'Hindi'), (u'hr', u'Croatian'), (u'hsb', u'Upper Sorbian'), (u'hu', u'Hungarian'), (u'ia', u'Interlingua'), (u'id', u'Indonesian'), (u'io', u'Ido'), (u'is', u'Icelandic'), (u'it', u'Italian'), (u'ja', u'Japanese'), (u'ka', u'Georgian'), (u'kk', u'Kazakh'), (u'km', u'Khmer'), (u'kn', u'Kannada'), (u'ko', u'Korean'), (u'lb', u'Luxembourgish'), (u'lt', u'Lithuanian'), (u'lv', u'Latvian'), (u'mk', u'Macedonian'), (u'ml', u'Malayalam'), (u'mn', u'Mongolian'), (u'mr', u'Marathi'), (u'my', u'Burmese'), (u'nb', u'Norwegian Bokm\xe5l'), (u'ne', u'Nepali'), (u'nl', u'Dutch'), (u'nn', u'Norwegian Nynorsk'), (u'os', u'Ossetic'), (u'pa', u'Punjabi'), (u'pl', u'Polish'), (u'pt', u'Portuguese'), (u'pt-br', u'Brazilian Portuguese'), (u'ro', u'Romanian'), (u'ru', u'Russian'), (u'sk', u'Slovak'), (u'sl', u'Slovenian'), (u'sq', u'Albanian'), (u'sr', u'Serbian'), (u'sr-latn', u'Serbian Latin'), (u'sv', u'Swedish'), (u'sw', u'Swahili'), (u'ta', u'Tamil'), (u'te', u'Telugu'), (u'th', u'Thai'), (u'tr', u'Turkish'), (u'tt', u'Tatar'), (u'udm', u'Udmurt'), (u'uk', u'Ukrainian'), (u'ur', u'Urdu'), (u'vi', u'Vietnamese'), (u'zh-hans', u'Simplified Chinese'), (u'zh-hant', u'Traditional Chinese')] LANGUAGES_BIDI = [u'he', u'ar', u'fa', u'ur'] LANGUAGE_CODE = 'en-us' LANGUAGE_COOKIE_AGE = None LANGUAGE_COOKIE_DOMAIN = None LANGUAGE_COOKIE_NAME = u'django_language' LANGUAGE_COOKIE_PATH = u'/' LAST_GIT_COMMIT_HASH = '' LICENSE_CHECK_BINARY = '/usr/bin/openalpr-licensecheck' LICENSE_REQUEST_BINARY = '/usr/bin/openalpr-licenserequest' LOCALE_PATHS = [] LOGGING = {'loggers': {'applog': {'handlers': ['console', 'file'], 'propagate': True, 'level': 'INFO'}}, 'version': 1, 'formatters': {'simple': {'format': '%(levelname)s %(module)s: %(message)s'}, 'verbose': {'format': '%(levelname)s %(asctime)s %(pathname)s:%(funcName)s:%(lineno)d %(process)d %(thread)d %(message)s'}}, 'disable_existing_loggers': False, 'handlers': {'console': {'formatter': 'simple', 'class': 'logging.StreamHandler', 'level': 'INFO'}, 'file': {'backupCount': 2, 'level': 'INFO', 'filename': '/var/log/openalpr/web.log', 'formatter': 'verbose', 'class': 'logging.handlers.RotatingFileHandler', 'maxBytes': 52428800}}} LOGGING_CONFIG = u'logging.config.dictConfig' LOGIN_REDIRECT_URL = '/' LOGIN_URL = '/account/login' LOGOUT_REDIRECT_URL = None MANAGERS = [] MAX_ALERTS_TO_DISPLAY = 1000 MAX_ALERT_CSV_IMPORT = 500000000 MAX_FUTURE_DATA_THRESHOLD_SECONDS = 10800 MAX_PAST_DATA_THRESHOLD_SECONDS = 2592000 MAX_SEARCH_AUDIT_RESULTS = 3000 MAX_TOPN_WEBSERVICE_SEARCH = 10000 MEDIA_ROOT = u'' MEDIA_URL = u'' MESSAGE_STORAGE = u'django.contrib.messages.storage.fallback.FallbackStorage' MIDDLEWARE = None MIDDLEWARE_CLASSES = u"('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'alprsite.middleware.SessionExtMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware')" MIGRATION_MODULES = {} MINIMUM_VIDEO_RECORD_AGENT_VERSION = '2.6.101' MIN_PLATE_CONFIDENCE_TO_WHITELIST = 84 MONTH_DAY_FORMAT = u'F j' NIGHTLY_BILLING = False NIGHTLY_TRIAL_EXPIRATIONS = False NUMBER_GROUPING = 0 OBJECT_CACHE_TIME_SECONDS = 1800 PASSWORD_HASHERS = u'********************' PASSWORD_RESET_TIMEOUT_DAYS = u'********************' PLATE_MAX_LENGTH = 10 PREPEND_WWW = False PROFESSIONAL_ACCOUNT_MAX_HISTORY_DAYS = 62 QUEUES = {'ADMIN': {'url': '/worker/process', 'threads': 1, 'name': 'alprweb-onprem-admin'}, 'URGENT': {'url': '/worker/process', 'threads': 2, 'name': 'alprweb-onprem-urgent', 'timeout': 60}, 'MAIN': {'url': '/worker/process', 'threads': 6, 'name': 'alprweb-onprem-main'}, 'ANALYTICS': {'url': '/worker/analytics', 'threads': 1, 'name': 'alprweb-onprem-analytics', 'timeout': 40000}} QUEUING_REDIS_DATABASE = 10 QUEUING_REDIS_PORT = 6379 QUEUING_REDIS_SERVER = 'localhost' RATELIMIT_KEY = u'********************' RATELIMIT_MAX_RATE = '50000/s' RATELIMIT_PLATES_MAX_RATE = '50000/s' RECAPTCHA_PRIVATE_KEY = u'********************' RECAPTCHA_PUBLIC_KEY = u'********************' REDIS_CONFIG = {'USERNAME': None, 'HOSTNAME': 'localhost', 'PORT': 6379, 'PASSWORD': u'********************', 'MAX_QUEUE_LENGTH': 50000} REGIONS_DATA_PATH = '/usr/share/openalpr-web/webservice/regions-data.json' REPORT_PDF_SUPPORTS_JPEG = False REST_FRAMEWORK = {'MAX_PAGINATE_BY': 100, 'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticated',), 'PAGE_SIZE': 10, 'PAGINATE_BY_PARAM': 'page_size', 'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.SessionAuthentication', 'webservice.company_id_auth.CompanyIdAuth')} ROOT_URLCONF = 'alprsite.urls' SECRET_KEY = u'********************' SECURE_BROWSER_XSS_FILTER = False SECURE_CONTENT_TYPE_NOSNIFF = False SECURE_HSTS_INCLUDE_SUBDOMAINS = False SECURE_HSTS_PRELOAD = False SECURE_HSTS_SECONDS = 0 SECURE_PROXY_SSL_HEADER = None SECURE_REDIRECT_EXEMPT = [] SECURE_SSL_HOST = None SECURE_SSL_REDIRECT = False SERVER_EMAIL = 'www@localhost' SESSION_CACHE_ALIAS = u'default' SESSION_COOKIE_AGE = 1209600 SESSION_COOKIE_DOMAIN = None SESSION_COOKIE_HTTPONLY = True SESSION_COOKIE_NAME = u'sessionid' SESSION_COOKIE_PATH = u'/' SESSION_COOKIE_SECURE = False SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db' SESSION_EXPIRE_AT_BROWSER_CLOSE = False SESSION_FILE_PATH = None SESSION_SAVE_EVERY_REQUEST = False SESSION_SERIALIZER = u'django.contrib.sessions.serializers.JSONSerializer' SETTINGS_MODULE = 'alprsite.settings' SHORT_DATETIME_FORMAT = u'm/d/Y P' SHORT_DATE_FORMAT = u'm/d/Y' SIGNING_BACKEND = u'django.core.signing.TimestampSigner' SILENCED_SYSTEM_CHECKS = [] SITE_BASE_URL = 'http://127.0.0.1' SITE_INTERNAL_URL = 'http://127.0.0.1:9001/' SITE_NAME_LENGTH = 64 SMTP_DOMAIN = 'yourdomain.com' SMTP_PASSWORD = u'********************' SMTP_PORT = 465 SMTP_SERVER = 'localhost' SMTP_USERNAME = 'user' SSL_CERTIFICATE_PATH = '/usr/share/openalpr-websockets/cert/websockets.crt' SSL_PRIVATE_KEY_PATH = u'********************' STATICFILES_DIRS = [] STATICFILES_FINDERS = [u'django.contrib.staticfiles.finders.FileSystemFinder', u'django.contrib.staticfiles.finders.AppDirectoriesFinder'] STATICFILES_STORAGE = u'django.contrib.staticfiles.storage.StaticFilesStorage' STATIC_ROOT = '/usr/share/openalpr-web/static/' STATIC_URL = '/static/' SYSTEM_INTERFACE_URL = 'http://127.0.0.1:53901' TEMPLATES = [{'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'debug': False, 'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'registration.access_level.alpr_access_level']}, 'BACKEND': 'django.template.backends.django.DjangoTemplates'}] TEST_NON_SERIALIZED_APPS = [] TEST_RUNNER = u'django.test.runner.DiscoverRunner' THOUSAND_SEPARATOR = u',' TIME_FORMAT = u'P' TIME_INPUT_FORMATS = [u'%H:%M:%S', u'%H:%M:%S.%f', u'%H:%M'] TIME_ZONE = 'UTC' USE_ETAGS = False USE_I18N = True USE_L10N = True USE_THOUSAND_SEPARATOR = False USE_TZ = True USE_X_FORWARDED_HOST = False USE_X_FORWARDED_PORT = False WEBHOOK_PARALLEL_THREADS = 200 WEBSERVICE_SYMMETRIC_KEY = u'********************' WEBSOCKETS_QUERY_BASE_URL = 'http://localhost:9502' WEBSOCKETS_URL = None WSGI_APPLICATION = 'alprsite.wsgi.application' X_FRAME_OPTIONS = u'SAMEORIGIN' YEAR_MONTH_FORMAT = u'F Y'

Internal Server Error: /api/search/alert OperationalError at /api/search/alert (1040, ‘Too many connections’) Request Method: GET Request URL: https://192.168.125.8/api/search/alert?topn=10 Django Version: 1.11.13 Python Executable: /usr/share/openalpr-web/venv/bin/python Python Version: 2.7.12 Python Path: [’/usr/share/openalpr-web’, ‘/’, ‘/usr/share/openalpr-web/venv/bin’, ‘/usr/share/openalpr-web/venv/lib/python2.7’, ‘/usr/share/openalpr-web/venv/lib/python2.7/plat-x86_64-linux-gnu’, ‘/usr/share/openalpr-web/venv/lib/python2.7/lib-tk’, ‘/usr/share/openalpr-web/venv/lib/python2.7/lib-old’, ‘/usr/share/openalpr-web/venv/lib/python2.7/lib-dynload’, ‘/usr/lib/python2.7’, ‘/usr/lib/python2.7/plat-x86_64-linux-gnu’, ‘/usr/lib/python2.7/lib-tk’, ‘/usr/share/openalpr-web/venv/lib/python2.7/site-packages’] Server time: Tue, 15 Jan 2019 10:18:02 +0000 Installed Applications: (‘django.contrib.admin’, ‘django.contrib.auth’, ‘django.contrib.contenttypes’, ‘django.contrib.sessions’, ‘django.contrib.messages’, ‘django.contrib.staticfiles’, ‘django.contrib.humanize’, ‘rest_framework’, ‘bootstrapform’, ‘front’, ‘audit’, ‘registration’, ‘configuration’, ‘video’, ‘worker’, ‘webservice’, ‘ratelimit’, ‘reports’, ‘plate_analytics’) Installed Middleware: (‘django.contrib.sessions.middleware.SessionMiddleware’, ‘django.middleware.common.CommonMiddleware’, ‘django.middleware.csrf.CsrfViewMiddleware’, ‘django.contrib.auth.middleware.AuthenticationMiddleware’, ‘django.contrib.auth.middleware.SessionAuthenticationMiddleware’, ‘alprsite.middleware.SessionExtMiddleware’, ‘django.contrib.messages.middleware.MessageMiddleware’, ‘django.middleware.clickjacking.XFrameOptionsMiddleware’) Traceback: File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/handlers/exception.py” in inner 41. response = get_response(request) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/handlers/base.py” in _legacy_get_response 249. response = self._get_response(request) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/handlers/base.py” in _get_response 187. response = self.process_exception_by_middleware(e, request) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/handlers/base.py” in _get_response 185. response = wrapped_callback(request, *callback_args, callback_kwargs) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/ratelimit/decorators.py” in _wrapped 30. return fn(*args, kw) File “/usr/share/openalpr-web/webservice/views.py” in customsearch 183. if request.user.is_authenticated(): File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/functional.py” in inner 238. self._setup() File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/functional.py” in _setup 386. self._wrapped = self._setupfunc() File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/auth/middleware.py” in 24. request.user = SimpleLazyObject(lambda: get_user(request)) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/auth/middleware.py” in get_user 12. request._cached_user = auth.get_user(request) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/auth/init.py” in get_user 218. user = backend.get_user(user_id) File “/usr/share/openalpr-web/registration/models.py” in get_user 224. return ALPRUser.objects.get(pk=user_id) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/manager.py” in manager_method 85. return getattr(self.get_queryset(), name)(args, **kwargs) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/query.py” in get 374. num = len(clone) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/query.py” in len 232. self._fetch_all() File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/query.py” in _fetch_all 1118. self._result_cache = list(self._iterable_class(self)) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/query.py” in iter 53. results = compiler.execute_sql(chunked_fetch=self.chunked_fetch) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py” in execute_sql 876. sql, params = self.as_sql() File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py” in as_sql 441. where, w_params = self.compile(self.where) if self.where is not None else ("", []) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py” in compile 373. sql, params = node.as_sql(self, self.connection) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/sql/where.py” in as_sql 79. sql, params = compiler.compile(child) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py” in compile 373. sql, params = node.as_sql(self, self.connection) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/lookups.py” in as_sql 169. lhs_sql, params = self.process_lhs(compiler, connection) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/lookups.py” in process_lhs 162. db_type = self.lhs.output_field.db_type(connection=connection) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/models/fields/init.py” in db_type 644. return connection.data_types[self.get_internal_type()] % data File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/functional.py” in get 35. res = instance.dict[self.name] = self.func(instance) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py” in data_types 174. if self.features.supports_microsecond_precision: File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/functional.py” in get 35. res = instance.dict[self.name] = self.func(instance) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/mysql/features.py” in supports_microsecond_precision 53. return self.connection.mysql_version >= (5, 6, 4) and Database.version_info >= (1, 2, 5) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/functional.py” in get 35. res = instance.dict[self.name] = self.func(instance) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py” in mysql_version 385. with self.temporary_connection() as cursor: File “/usr/lib/python2.7/contextlib.py” in enter 17. return self.gen.next() File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py” in temporary_connection 591. cursor = self.cursor() File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py” in cursor 254. return self._cursor() File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py” in _cursor 229. self.ensure_connection() File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py” in ensure_connection 213. self.connect() File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/utils.py” in exit 94. six.reraise(dj_exc_type, dj_exc_value, traceback) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py” in ensure_connection 213. self.connect() File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/base/base.py” in connect 189. self.connection = self.get_new_connection(conn_params) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py” in get_new_connection 274. conn = Database.connect(**conn_params) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/MySQLdb/init.py” in Connect 81. return Connection(args, **kwargs) File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/MySQLdb/connections.py” in init 193. super(Connection, self).init(args, **kwargs2) Exception Type: OperationalError at /api/search/alert Exception Value: (1040, ‘Too many connections’) Request information: USER: [admin@ bmoreit. com](mailto:admin@ bmoreit. com) GET: topn = u’10’ POST: No POST data FILES: No FILES data COOKIES: csrftoken = ‘OTnPVQHld0lOfTlMLjRFtnCPyciUYkn4iFNtPrS9veds2KR0VtPQvw6ZKh7qrXdD’ sessionid = ‘oa0dkrdes5vk84htcf0bt5eb86a1utgr’ META: CSRF_COOKIE = ‘OTnPVQHld0lOfTlMLjRFtnCPyciUYkn4iFNtPrS9veds2KR0VtPQvw6ZKh7qrXdD’ HTTP_ACCEPT = '/’ HTTP_ACCEPT_ENCODING = ‘gzip, deflate, br’ HTTP_ACCEPT_LANGUAGE = ‘en-US,en;q=0.9’ HTTP_CONNECTION = ‘close’ HTTP_COOKIE = ‘csrftoken=OTnPVQHld0lOfTlMLjRFtnCPyciUYkn4iFNtPrS9veds2KR0VtPQvw6ZKh7qrXdD; sessionid=oa0dkrdes5vk84htcf0bt5eb86a1utgr’ HTTP_HOST = ‘192.168.125.8’ HTTP_REFERER = ‘https://192.168.125.8/’ HTTP_USER_AGENT = ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36’ HTTP_X_FORWARDED_FOR = ‘192.168.127.2’ HTTP_X_FORWARDED_PROTO = ‘https’ HTTP_X_REQUESTED_WITH = ‘XMLHttpRequest’ HTTP_X_SCHEME = ‘https’ PATH_INFO = u’/api/search/alert’ QUERY_STRING = ‘topn=10’ RAW_URI = ‘/api/search/alert?topn=10’ REMOTE_ADDR = ‘127.0.0.1’ REMOTE_PORT = ‘53968’ REQUEST_METHOD = ‘GET’ SCRIPT_NAME = u’’ SERVER_NAME = ‘127.0.0.1’ SERVER_PORT = ‘9001’ SERVER_PROTOCOL = ‘HTTP/1.0’ SERVER_SOFTWARE = ‘gunicorn/19.8.1’ gunicorn.socket = wsgi.errors = wsgi.file_wrapper = ‘’ wsgi.input = wsgi.multiprocess = True wsgi.multithread = True wsgi.run_once = False wsgi.url_scheme = ‘https’ wsgi.version = u’(1, 0)’ Settings: Using settings module alprsite.settings ABSOLUTE_URL_OVERRIDES = {} ADMINS = u"((‘No One’, ‘noone@localhost’),)" AGENT_BLACKLIST = [] AGENT_VERSION_MIN_RECOMMENDED = ‘2.5.103’ ALERTS_MAX_EMAILS_PER_HOUR = 5000 ALERTS_MIN_SECONDS_BETWEEN_NEW_PLATES = 5 ALLOWED_HOSTS = [’’] ANALYTICS_CONVOY_MAX_PERIOD = 30 ANALYTICS_INTERDICTION_MAX_PERIOD = 1440 ANALYTICS_MAX_QUERY_RESULTS = 1000000 ANALYTICS_PAGE_LENGTH = 25 ANALYTICS_TITLE_MAX_LEN = 100 APPEND_SLASH = True AUTHENTICATION_BACKENDS = u"(‘registration.models.SkeletonKeyAuthBackend’,)" AUTH_PASSWORD_VALIDATORS = u’’ AUTH_USER_MODEL = ‘registration.ALPRUser’ AWS_ACCESS_KEY = u’’ AWS_REGION = ‘none’ AWS_SECRET_KEY = u’’ BASE_DIR = ‘/usr/share/openalpr-web’ BASIC_ACCOUNT_MAX_HISTORY_DAYS = 31 BASIC_ACCOUNT_MAX_USERS = 5 BULK_SEARCH_MAX_ROWS = 100000 CACHES = {‘default’: {‘BACKEND’: ‘redis_cache.RedisCache’, ‘KEY_PREFIX’: u’’, ‘OPTIONS’: {‘CONNECTION_POOL_CLASS’: ‘redis.BlockingConnectionPool’, ‘PICKLE_VERSION’: -1, ‘DB’: 1, ‘CONNECTION_POOL_CLASS_KWARGS’: {‘timeout’: 20, ‘max_connections’: 200}, ‘SERIALIZER_CLASS’: ‘redis_cache.serializers.JSONSerializer’, ‘MAX_CONNECTIONS’: 1000}, ‘TIMEOUT’: 1800, ‘LOCATION’: [‘localhost:6379’]}, ‘models’: {‘BACKEND’: ‘redis_cache.RedisCache’, ‘KEY_PREFIX’: u’’, ‘OPTIONS’: {‘CONNECTION_POOL_CLASS’: ‘redis.BlockingConnectionPool’, ‘PICKLE_VERSION’: -1, ‘DB’: 1, ‘CONNECTION_POOL_CLASS_KWARGS’: {‘timeout’: 20, ‘max_connections’: 200}, ‘SERIALIZER_CLASS’: ‘redis_cache.serializers.PickleSerializer’, ‘MAX_CONNECTIONS’: 1000}, ‘TIMEOUT’: 1800, ‘LOCATION’: [‘localhost:6379’]}} CACHE_MIDDLEWARE_ALIAS = u’default’ CACHE_MIDDLEWARE_KEY_PREFIX = u’’ CACHE_MIDDLEWARE_SECONDS = 600 CAMERA_LIST_PATH = ‘/usr/share/openalpr-web/static/cameras.yaml’ CAMERA_NAME_LENGTH = 64 CLOUD_AGENT_BUCKET = ‘none’ CLOUD_PROCESSOR_REDIS_DATABASE = 8 CLOUD_PROCESSOR_REDIS_HOST = ‘localhost’ CLOUD_PROCESSOR_REDIS_PORT = 6379 CSRF_COOKIE_AGE = 31449600 CSRF_COOKIE_DOMAIN = None CSRF_COOKIE_HTTPONLY = False CSRF_COOKIE_NAME = u’csrftoken’ CSRF_COOKIE_PATH = u’/’ CSRF_COOKIE_SECURE = False CSRF_FAILURE_VIEW = u’django.views.csrf.csrf_failure’ CSRF_HEADER_NAME = u’HTTP_X_CSRFTOKEN’ CSRF_TRUSTED_ORIGINS = [] CSRF_USE_SESSIONS = False CUSTOM_BRANDING = {‘support_phone’: ‘1-800-935-1699’, ‘images_path’: ‘css/images/’, ‘product_name’: ‘OpenALPR’, ‘company_name’: ‘OpenALPR Technology, Inc.’, ‘show_email_header’: True, ‘support_email’: ‘info@openalpr.com’} DATABASES = {‘default’: {‘ENGINE’: ‘django.db.backends.mysql’, ‘AUTOCOMMIT’: True, ‘ATOMIC_REQUESTS’: False, ‘NAME’: ‘openalpr’, ‘CONN_MAX_AGE’: 600, ‘TIME_ZONE’: None, ‘PORT’: ‘3306’, ‘HOST’: ‘localhost’, ‘USER’: ‘openalpr’, ‘TEST’: {‘COLLATION’: None, ‘CHARSET’: None, ‘NAME’: None, ‘MIRROR’: None}, ‘PASSWORD’: u’’, ‘OPTIONS’: {}}} DATABASE_ROUTERS = [] DATADOG_STATSD_HOST = ‘’ DATA_RETENTION_DAYS = {‘db_alert_data’: 950, ‘metrics_1_hour’: 183, ‘db_plate_data’: 94, ‘metrics_5_min’: 14, ‘metrics_1_day’: 72000} DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440 DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000 DATETIME_FORMAT = u’N j, Y, P’ DATETIME_INPUT_FORMATS = [u’%Y-%m-%d %H:%M:%S’, u’%Y-%m-%d %H:%M:%S.%f’, u’%Y-%m-%d %H:%M’, u’%Y-%m-%d’, u’%m/%d/%Y %H:%M:%S’, u’%m/%d/%Y %H:%M:%S.%f’, u’%m/%d/%Y %H:%M’, u’%m/%d/%Y’, u’%m/%d/%y %H:%M:%S’, u’%m/%d/%y %H:%M:%S.%f’, u’%m/%d/%y %H:%M’, u’%m/%d/%y’] DATE_FORMAT = u’N j, Y’ DATE_INPUT_FORMATS = [u’%Y-%m-%d’, u’%m/%d/%Y’, u’%m/%d/%y’, u’%b %d %Y’, u’%b %d, %Y’, u’%d %b %Y’, u’%d %b, %Y’, u’%B %d %Y’, u’%B %d, %Y’, u’%d %B %Y’, u’%d %B, %Y’] DEBUG = False DEBUG_PROPAGATE_EXCEPTIONS = False DECIMAL_SEPARATOR = u’.’ DEFAULT_CHARSET = u’utf-8’ DEFAULT_CONTENT_TYPE = u’text/html’ DEFAULT_EXCEPTION_REPORTER_FILTER = u’django.views.debug.SafeExceptionReporterFilter’ DEFAULT_FILE_STORAGE = u’django.core.files.storage.FileSystemStorage’ DEFAULT_FROM_EMAIL = u’webmaster@localhost’ DEFAULT_INDEX_TABLESPACE = u’’ DEFAULT_SETTINGS = DEFAULT_TABLESPACE = u’’ DISABLE_WORKER_URLS = False DISALLOWED_USER_AGENTS = [] EMAIL_BACKEND = ‘alprsite.email_sender.EmailSender’ EMAIL_HOST = u’localhost’ EMAIL_HOST_PASSWORD = u’’ EMAIL_HOST_USER = u’’ EMAIL_LIST_CLOUDDELETE_ID = None EMAIL_LIST_CLOUDSIGNUPS_ID = None EMAIL_LIST_SUBSCRIBE_URL = None EMAIL_PORT = 25 EMAIL_SSL_CERTFILE = None EMAIL_SSL_KEYFILE = u’’ EMAIL_SUBJECT_PREFIX = u’[Django] ’ EMAIL_TIMEOUT = None EMAIL_USE_LOCALTIME = False EMAIL_USE_SSL = False EMAIL_USE_TLS = False ENABLE_ANALYTICS = True FILE_CHARSET = u’utf-8’ FILE_UPLOAD_DIRECTORY_PERMISSIONS = None FILE_UPLOAD_HANDLERS = [u’django.core.files.uploadhandler.MemoryFileUploadHandler’, u’django.core.files.uploadhandler.TemporaryFileUploadHandler’] FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 FILE_UPLOAD_PERMISSIONS = None FILE_UPLOAD_TEMP_DIR = None FIRST_DAY_OF_WEEK = 0 FIXTURE_DIRS = [] FORCE_SCRIPT_NAME = None FORMAT_MODULE_PATH = None FORM_RENDERER = u’django.forms.renderers.DjangoTemplates’ FREE_ACCOUNT_MAX_HISTORY_DAYS = 2 FREE_ACCOUNT_MAX_USERS = 2 FREE_TRIAL_PERIOD_DAYS = 15 FROM_EMAIL_NOREPLY = ‘no-reply@localhost’ FROM_EMAIL_REPLY = ‘info@localhost’ IGNORABLE_404_URLS = [] INSTALLED_APPS = u"(‘django.contrib.admin’, ‘django.contrib.auth’, ‘django.contrib.contenttypes’, ‘django.contrib.sessions’, ‘django.contrib.messages’, ‘django.contrib.staticfiles’, ‘django.contrib.humanize’, ‘rest_framework’, ‘bootstrapform’, ‘front’, ‘audit’, ‘registration’, ‘configuration’, ‘video’, ‘worker’, ‘webservice’, ‘ratelimit’, ‘reports’, ‘plate_analytics’)" INTERNAL_IPS = [] IS_SAAS = False LANGUAGES = [(u’af’, u’Afrikaans’), (u’ar’, u’Arabic’), (u’ast’, u’Asturian’), (u’az’, u’Azerbaijani’), (u’bg’, u’Bulgarian’), (u’be’, u’Belarusian’), (u’bn’, u’Bengali’), (u’br’, u’Breton’), (u’bs’, u’Bosnian’), (u’ca’, u’Catalan’), (u’cs’, u’Czech’), (u’cy’, u’Welsh’), (u’da’, u’Danish’), (u’de’, u’German’), (u’dsb’, u’Lower Sorbian’), (u’el’, u’Greek’), (u’en’, u’English’), (u’en-au’, u’Australian English’), (u’en-gb’, u’British English’), (u’eo’, u’Esperanto’), (u’es’, u’Spanish’), (u’es-ar’, u’Argentinian Spanish’), (u’es-co’, u’Colombian Spanish’), (u’es-mx’, u’Mexican Spanish’), (u’es-ni’, u’Nicaraguan Spanish’), (u’es-ve’, u’Venezuelan Spanish’), (u’et’, u’Estonian’), (u’eu’, u’Basque’), (u’fa’, u’Persian’), (u’fi’, u’Finnish’), (u’fr’, u’French’), (u’fy’, u’Frisian’), (u’ga’, u’Irish’), (u’gd’, u’Scottish Gaelic’), (u’gl’, u’Galician’), (u’he’, u’Hebrew’), (u’hi’, u’Hindi’), (u’hr’, u’Croatian’), (u’hsb’, u’Upper Sorbian’), (u’hu’, u’Hungarian’), (u’ia’, u’Interlingua’), (u’id’, u’Indonesian’), (u’io’, u’Ido’), (u’is’, u’Icelandic’), (u’it’, u’Italian’), (u’ja’, u’Japanese’), (u’ka’, u’Georgian’), (u’kk’, u’Kazakh’), (u’km’, u’Khmer’), (u’kn’, u’Kannada’), (u’ko’, u’Korean’), (u’lb’, u’Luxembourgish’), (u’lt’, u’Lithuanian’), (u’lv’, u’Latvian’), (u’mk’, u’Macedonian’), (u’ml’, u’Malayalam’), (u’mn’, u’Mongolian’), (u’mr’, u’Marathi’), (u’my’, u’Burmese’), (u’nb’, u’Norwegian Bokm\xe5l’), (u’ne’, u’Nepali’), (u’nl’, u’Dutch’), (u’nn’, u’Norwegian Nynorsk’), (u’os’, u’Ossetic’), (u’pa’, u’Punjabi’), (u’pl’, u’Polish’), (u’pt’, u’Portuguese’), (u’pt-br’, u’Brazilian Portuguese’), (u’ro’, u’Romanian’), (u’ru’, u’Russian’), (u’sk’, u’Slovak’), (u’sl’, u’Slovenian’), (u’sq’, u’Albanian’), (u’sr’, u’Serbian’), (u’sr-latn’, u’Serbian Latin’), (u’sv’, u’Swedish’), (u’sw’, u’Swahili’), (u’ta’, u’Tamil’), (u’te’, u’Telugu’), (u’th’, u’Thai’), (u’tr’, u’Turkish’), (u’tt’, u’Tatar’), (u’udm’, u’Udmurt’), (u’uk’, u’Ukrainian’), (u’ur’, u’Urdu’), (u’vi’, u’Vietnamese’), (u’zh-hans’, u’Simplified Chinese’), (u’zh-hant’, u’Traditional Chinese’)] LANGUAGES_BIDI = [u’he’, u’ar’, u’fa’, u’ur’] LANGUAGE_CODE = ‘en-us’ LANGUAGE_COOKIE_AGE = None LANGUAGE_COOKIE_DOMAIN = None LANGUAGE_COOKIE_NAME = u’django_language’ LANGUAGE_COOKIE_PATH = u’/’ LAST_GIT_COMMIT_HASH = ‘’ LICENSE_CHECK_BINARY = ‘/usr/bin/openalpr-licensecheck’ LICENSE_REQUEST_BINARY = ‘/usr/bin/openalpr-licenserequest’ LOCALE_PATHS = [] LOGGING = {‘loggers’: {‘applog’: {‘handlers’: [‘console’, ‘file’], ‘propagate’: True, ‘level’: ‘INFO’}}, ‘version’: 1, ‘formatters’: {‘simple’: {‘format’: ‘%(levelname)s %(module)s: %(message)s’}, ‘verbose’: {‘format’: ‘%(levelname)s %(asctime)s %(pathname)s:%(funcName)s:%(lineno)d %(process)d %(thread)d %(message)s’}}, ‘disable_existing_loggers’: False, ‘handlers’: {‘console’: {‘formatter’: ‘simple’, ‘class’: ‘logging.StreamHandler’, ‘level’: ‘INFO’}, ‘file’: {‘backupCount’: 2, ‘level’: ‘INFO’, ‘filename’: ‘/var/log/openalpr/web.log’, ‘formatter’: ‘verbose’, ‘class’: ‘logging.handlers.RotatingFileHandler’, ‘maxBytes’: 52428800}}} LOGGING_CONFIG = u’logging.config.dictConfig’ LOGIN_REDIRECT_URL = ‘/’ LOGIN_URL = ‘/account/login’ LOGOUT_REDIRECT_URL = None MANAGERS = [] MAX_ALERTS_TO_DISPLAY = 1000 MAX_ALERT_CSV_IMPORT = 500000000 MAX_FUTURE_DATA_THRESHOLD_SECONDS = 10800 MAX_PAST_DATA_THRESHOLD_SECONDS = 2592000 MAX_SEARCH_AUDIT_RESULTS = 3000 MAX_TOPN_WEBSERVICE_SEARCH = 10000 MEDIA_ROOT = u’’ MEDIA_URL = u’’ MESSAGE_STORAGE = u’django.contrib.messages.storage.fallback.FallbackStorage’ MIDDLEWARE = None MIDDLEWARE_CLASSES = u"(‘django.contrib.sessions.middleware.SessionMiddleware’, ‘django.middleware.common.CommonMiddleware’, ‘django.middleware.csrf.CsrfViewMiddleware’, ‘django.contrib.auth.middleware.AuthenticationMiddleware’, ‘django.contrib.auth.middleware.SessionAuthenticationMiddleware’, ‘alprsite.middleware.SessionExtMiddleware’, ‘django.contrib.messages.middleware.MessageMiddleware’, ‘django.middleware.clickjacking.XFrameOptionsMiddleware’)" MIGRATION_MODULES = {} MINIMUM_VIDEO_RECORD_AGENT_VERSION = ‘2.6.101’ MIN_PLATE_CONFIDENCE_TO_WHITELIST = 84 MONTH_DAY_FORMAT = u’F j’ NIGHTLY_BILLING = False NIGHTLY_TRIAL_EXPIRATIONS = False NUMBER_GROUPING = 0 OBJECT_CACHE_TIME_SECONDS = 1800 PASSWORD_HASHERS = u’’ PASSWORD_RESET_TIMEOUT_DAYS = u’’ PLATE_MAX_LENGTH = 10 PREPEND_WWW = False PROFESSIONAL_ACCOUNT_MAX_HISTORY_DAYS = 62 QUEUES = {‘ADMIN’: {‘url’: ‘/worker/process’, ‘threads’: 1, ‘name’: ‘alprweb-onprem-admin’}, ‘URGENT’: {‘url’: ‘/worker/process’, ‘threads’: 2, ‘name’: ‘alprweb-onprem-urgent’, ‘timeout’: 60}, ‘MAIN’: {‘url’: ‘/worker/process’, ‘threads’: 6, ‘name’: ‘alprweb-onprem-main’}, ‘ANALYTICS’: {‘url’: ‘/worker/analytics’, ‘threads’: 1, ‘name’: ‘alprweb-onprem-analytics’, ‘timeout’: 40000}} QUEUING_REDIS_DATABASE = 10 QUEUING_REDIS_PORT = 6379 QUEUING_REDIS_SERVER = ‘localhost’ RATELIMIT_KEY = u’’ RATELIMIT_MAX_RATE = ‘50000/s’ RATELIMIT_PLATES_MAX_RATE = ‘50000/s’ RECAPTCHA_PRIVATE_KEY = u’’ RECAPTCHA_PUBLIC_KEY = u’’ REDIS_CONFIG = {‘USERNAME’: None, ‘HOSTNAME’: ‘localhost’, ‘PORT’: 6379, ‘PASSWORD’: u’’, ‘MAX_QUEUE_LENGTH’: 50000} REGIONS_DATA_PATH = ‘/usr/share/openalpr-web/webservice/regions-data.json’ REPORT_PDF_SUPPORTS_JPEG = False REST_FRAMEWORK = {‘MAX_PAGINATE_BY’: 100, ‘DEFAULT_PERMISSION_CLASSES’: (‘rest_framework.permissions.IsAuthenticated’,), ‘PAGE_SIZE’: 10, ‘PAGINATE_BY_PARAM’: ‘page_size’, ‘DEFAULT_AUTHENTICATION_CLASSES’: (‘rest_framework.authentication.SessionAuthentication’, ‘webservice.company_id_auth.CompanyIdAuth’)} ROOT_URLCONF = ‘alprsite.urls’ SECRET_KEY = u’’ SECURE_BROWSER_XSS_FILTER = False SECURE_CONTENT_TYPE_NOSNIFF = False SECURE_HSTS_INCLUDE_SUBDOMAINS = False SECURE_HSTS_PRELOAD = False SECURE_HSTS_SECONDS = 0 SECURE_PROXY_SSL_HEADER = None SECURE_REDIRECT_EXEMPT = [] SECURE_SSL_HOST = None SECURE_SSL_REDIRECT = False SERVER_EMAIL = ‘www@localhost’ SESSION_CACHE_ALIAS = u’default’ SESSION_COOKIE_AGE = 1209600 SESSION_COOKIE_DOMAIN = None SESSION_COOKIE_HTTPONLY = True SESSION_COOKIE_NAME = u’sessionid’ SESSION_COOKIE_PATH = u’/’ SESSION_COOKIE_SECURE = False SESSION_ENGINE = ‘django.contrib.sessions.backends.cached_db’ SESSION_EXPIRE_AT_BROWSER_CLOSE = False SESSION_FILE_PATH = None SESSION_SAVE_EVERY_REQUEST = False SESSION_SERIALIZER = u’django.contrib.sessions.serializers.JSONSerializer’ SETTINGS_MODULE = ‘alprsite.settings’ SHORT_DATETIME_FORMAT = u’m/d/Y P’ SHORT_DATE_FORMAT = u’m/d/Y’ SIGNING_BACKEND = u’django.core.signing.TimestampSigner’ SILENCED_SYSTEM_CHECKS = [] SITE_BASE_URL = ‘http:// 127.0.0.1’ SITE_INTERNAL_URL = ‘http:// 127.0.0.1:9001/’ SITE_NAME_LENGTH = 64 SMTP_DOMAIN = ‘yourdomain. com’ SMTP_PASSWORD = u’’ SMTP_PORT = 465 SMTP_SERVER = ‘localhost’ SMTP_USERNAME = ‘user’ SSL_CERTIFICATE_PATH = ‘/usr/share/openalpr-websockets/cert/websockets.crt’ SSL_PRIVATE_KEY_PATH = u’’ STATICFILES_DIRS = [] STATICFILES_FINDERS = [u’django.contrib.staticfiles.finders.FileSystemFinder’, u’django.contrib.staticfiles.finders.AppDirectoriesFinder’] STATICFILES_STORAGE = u’django.contrib.staticfiles.storage.StaticFilesStorage’ STATIC_ROOT = ‘/usr/share/openalpr-web/static/’ STATIC_URL = ‘/static/’ SYSTEM_INTERFACE_URL = ‘http:// 127.0.0.1:53901’ TEMPLATES = [{‘DIRS’: [], ‘APP_DIRS’: True, ‘OPTIONS’: {‘debug’: False, ‘context_processors’: [‘django.template.context_processors.debug’, ‘django.template.context_processors.request’, ‘django.contrib.auth.context_processors.auth’, ‘django.contrib.messages.context_processors.messages’, ‘registration.access_level.alpr_access_level’]}, ‘BACKEND’: ‘django.template.backends.django.DjangoTemplates’}] TEST_NON_SERIALIZED_APPS = [] TEST_RUNNER = u’django.test.runner.DiscoverRunner’ THOUSAND_SEPARATOR = u’,’ TIME_FORMAT = u’P’ TIME_INPUT_FORMATS = [u’%H:%M:%S’, u’%H:%M:%S.%f’, u’%H:%M’] TIME_ZONE = ‘UTC’ USE_ETAGS = False USE_I18N = True USE_L10N = True USE_THOUSAND_SEPARATOR = False USE_TZ = True USE_X_FORWARDED_HOST = False USE_X_FORWARDED_PORT = False WEBHOOK_PARALLEL_THREADS = 200 WEBSERVICE_SYMMETRIC_KEY = u’****************’ WEBSOCKETS_QUERY_BASE_URL = ‘http:// localhost: 9502’ WEBSOCKETS_URL = None WSGI_APPLICATION = ‘alprsite.wsgi.application’ X_FRAME_OPTIONS = u’SAMEORIGIN’ YEAR_MONTH_FORMAT = u’F Y’