{"action":"created","issue":{"url":"https://api.github.com/repos/Princeton-CDH/derrida-django/issues/219","repository_url":"https://api.github.com/repos/Princeton-CDH/derrida-django","labels_url":"https://api.github.com/repos/Princeton-CDH/derrida-django/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/Princeton-CDH/derrida-django/issues/219/comments","events_url":"https://api.github.com/repos/Princeton-CDH/derrida-django/issues/219/events","html_url":"https://github.com/Princeton-CDH/derrida-django/issues/219","id":338972929,"node_id":"MDU6SXNzdWUzMzg5NzI5Mjk=","number":219,"title":"Sporadic ConnectionError causing 500s on page detail view","user":{"login":"rlskoeser","id":691231,"node_id":"MDQ6VXNlcjY5MTIzMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/691231?v=4","gravatar_id":"","url":"https://api.github.com/users/rlskoeser","html_url":"https://github.com/rlskoeser","followers_url":"https://api.github.com/users/rlskoeser/followers","following_url":"https://api.github.com/users/rlskoeser/following{/other_user}","gists_url":"https://api.github.com/users/rlskoeser/gists{/gist_id}","starred_url":"https://api.github.com/users/rlskoeser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlskoeser/subscriptions","organizations_url":"https://api.github.com/users/rlskoeser/orgs","repos_url":"https://api.github.com/users/rlskoeser/repos","events_url":"https://api.github.com/users/rlskoeser/events{/privacy}","received_events_url":"https://api.github.com/users/rlskoeser/received_events","type":"User","site_admin":false},"labels":[{"id":548995174,"node_id":"MDU6TGFiZWw1NDg5OTUxNzQ=","url":"https://api.github.com/repos/Princeton-CDH/derrida-django/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":{"login":"bwhicks","id":17815297,"node_id":"MDQ6VXNlcjE3ODE1Mjk3","avatar_url":"https://avatars2.githubusercontent.com/u/17815297?v=4","gravatar_id":"","url":"https://api.github.com/users/bwhicks","html_url":"https://github.com/bwhicks","followers_url":"https://api.github.com/users/bwhicks/followers","following_url":"https://api.github.com/users/bwhicks/following{/other_user}","gists_url":"https://api.github.com/users/bwhicks/gists{/gist_id}","starred_url":"https://api.github.com/users/bwhicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwhicks/subscriptions","organizations_url":"https://api.github.com/users/bwhicks/orgs","repos_url":"https://api.github.com/users/bwhicks/repos","events_url":"https://api.github.com/users/bwhicks/events{/privacy}","received_events_url":"https://api.github.com/users/bwhicks/received_events","type":"User","site_admin":false},"assignees":[{"login":"bwhicks","id":17815297,"node_id":"MDQ6VXNlcjE3ODE1Mjk3","avatar_url":"https://avatars2.githubusercontent.com/u/17815297?v=4","gravatar_id":"","url":"https://api.github.com/users/bwhicks","html_url":"https://github.com/bwhicks","followers_url":"https://api.github.com/users/bwhicks/followers","following_url":"https://api.github.com/users/bwhicks/following{/other_user}","gists_url":"https://api.github.com/users/bwhicks/gists{/gist_id}","starred_url":"https://api.github.com/users/bwhicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwhicks/subscriptions","organizations_url":"https://api.github.com/users/bwhicks/orgs","repos_url":"https://api.github.com/users/bwhicks/repos","events_url":"https://api.github.com/users/bwhicks/events{/privacy}","received_events_url":"https://api.github.com/users/bwhicks/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Princeton-CDH/derrida-django/milestones/6","html_url":"https://github.com/Princeton-CDH/derrida-django/milestone/6","labels_url":"https://api.github.com/repos/Princeton-CDH/derrida-django/milestones/6/labels","id":3652618,"node_id":"MDk6TWlsZXN0b25lMzY1MjYxOA==","number":6,"title":"Data download and fixes for public launch","description":"","creator":{"login":"rlskoeser","id":691231,"node_id":"MDQ6VXNlcjY5MTIzMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/691231?v=4","gravatar_id":"","url":"https://api.github.com/users/rlskoeser","html_url":"https://github.com/rlskoeser","followers_url":"https://api.github.com/users/rlskoeser/followers","following_url":"https://api.github.com/users/rlskoeser/following{/other_user}","gists_url":"https://api.github.com/users/rlskoeser/gists{/gist_id}","starred_url":"https://api.github.com/users/rlskoeser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlskoeser/subscriptions","organizations_url":"https://api.github.com/users/rlskoeser/orgs","repos_url":"https://api.github.com/users/rlskoeser/repos","events_url":"https://api.github.com/users/rlskoeser/events{/privacy}","received_events_url":"https://api.github.com/users/rlskoeser/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":5,"state":"open","created_at":"2018-09-13T18:29:50Z","updated_at":"2018-09-25T19:55:18Z","due_on":"2018-10-04T07:00:00Z","closed_at":null},"comments":0,"created_at":"2018-07-06T15:04:21Z","updated_at":"2018-09-25T19:55:18Z","closed_at":"2018-09-25T19:55:18Z","author_association":"CONTRIBUTOR","body":"Occasional connection errors are raising a 500 error; looks like it's when we attempt to retrieve the OCR text for a page image. We should add code to catch the error, log it, and display the page without the text. \r\n\r\n```\r\nInternal Server Error: /library/levi-strauss-la-pensee-sauvage-1962/gallery/p-285/\r\n\r\nConnectionError at /library/levi-strauss-la-pensee-sauvage-1962/gallery/p-285/\r\n('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))\r\n\r\nRequest Method: GET\r\nRequest URL: https://derridas-margins.princeton.edu/library/levi-strauss-la-pensee-sauvage-1962/gallery/p-285/\r\nDjango Version: 1.11.13\r\nPython Executable:\r\nPython Version: 3.5.1\r\nPython Path: ['/var/www/derridas-margins/env/lib/python3.5/site-packages', '/var/www/derridas-margins', '/opt/rh/rh-python35/root/usr/lib64/python35.zip', '/opt/rh/rh-python35/root/usr/lib64/python3.5', '/opt/rh/rh-python35/root/usr/lib64/python3.5/plat-linux', '/opt/rh/rh-python35/root/usr/lib64/python3.5/lib-dynload', '/opt/rh/rh-python35/root/usr/lib64/python3.5/site-packages', '/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages']\r\nServer time: Wed, 4 Jul 2018 16:11:23 -0400\r\nInstalled Applications:\r\n['mezzanine.boot',\r\n'dal',\r\n'dal_select2',\r\n'compressor',\r\n'django.contrib.auth',\r\n'django.contrib.contenttypes',\r\n'django.contrib.redirects',\r\n'django.contrib.sessions',\r\n'django.contrib.sitemaps',\r\n'django.contrib.sites',\r\n'django.contrib.messages',\r\n'django.contrib.humanize',\r\n'django_cas_ng',\r\n'mezzanine.conf',\r\n'mezzanine.core',\r\n'mezzanine.generic',\r\n'mezzanine.pages',\r\n'sortedm2m',\r\n'pucas',\r\n'djiffy',\r\n'annotator_store',\r\n'viapy',\r\n'haystack',\r\n'widget_tweaks',\r\n'markdownify',\r\n'fullurl',\r\n'derrida.apps.DerridaConfig',\r\n'derrida.books',\r\n'derrida.places',\r\n'derrida.people',\r\n'derrida.footnotes',\r\n'derrida.common',\r\n'derrida.interventions',\r\n'derrida.outwork',\r\n'filebrowser_safe',\r\n'grappelli',\r\n'django.contrib.admin',\r\n'django.contrib.staticfiles',\r\n'django_comments']\r\nInstalled Middleware:\r\n['django.middleware.security.SecurityMiddleware',\r\n'django.contrib.sessions.middleware.SessionMiddleware',\r\n'django.middleware.locale.LocaleMiddleware',\r\n'django.middleware.common.CommonMiddleware',\r\n'django.middleware.csrf.CsrfViewMiddleware',\r\n'django.contrib.auth.middleware.AuthenticationMiddleware',\r\n'django.contrib.messages.middleware.MessageMiddleware',\r\n'django.middleware.clickjacking.XFrameOptionsMiddleware',\r\n'mezzanine.core.request.CurrentRequestMiddleware',\r\n'mezzanine.core.middleware.RedirectFallbackMiddleware',\r\n'mezzanine.core.middleware.AdminLoginInterfaceSelectorMiddleware',\r\n'mezzanine.pages.middleware.PageMiddleware']\r\n\r\n\r\nTraceback:  \r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/urllib3/connectionpool.py\" in _make_request\r\n  377.                 httplib_response = conn.getresponse(buffering=True)\r\n  \r\n    \r\n      During handling of the above exception (getresponse() got an unexpected keyword argument 'buffering'), another exception occurred:\r\n    \r\n  \r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/urllib3/connectionpool.py\" in urlopen\r\n  600.                                                   chunked=chunked)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/urllib3/connectionpool.py\" in _make_request\r\n  384.                     six.raise_from(e, None)\r\n\r\nFile \"<string>\" in raise_from\r\n\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/urllib3/connectionpool.py\" in _make_request\r\n  380.                     httplib_response = conn.getresponse()\r\n\r\nFile \"/opt/rh/rh-python35/root/usr/lib64/python3.5/http/client.py\" in getresponse\r\n  1174.                 response.begin()\r\n\r\nFile \"/opt/rh/rh-python35/root/usr/lib64/python3.5/http/client.py\" in begin\r\n  282.             version, status, reason = self._read_status()\r\n\r\nFile \"/opt/rh/rh-python35/root/usr/lib64/python3.5/http/client.py\" in _read_status\r\n  251.             raise RemoteDisconnected(\"Remote end closed connection without\"\r\n  \r\n    \r\n      During handling of the above exception (Remote end closed connection without response), another exception occurred:\r\n    \r\n  \r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/requests/adapters.py\" in send\r\n  445.                     timeout=timeout\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/urllib3/connectionpool.py\" in urlopen\r\n  638.                                         _stacktrace=sys.exc_info()[2])\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/urllib3/util/retry.py\" in increment\r\n  367.                 raise six.reraise(type(error), error, _stacktrace)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/urllib3/packages/six.py\" in reraise\r\n  685.             raise value.with_traceback(tb)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/urllib3/connectionpool.py\" in urlopen\r\n  600.                                                   chunked=chunked)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/urllib3/connectionpool.py\" in _make_request\r\n  384.                     six.raise_from(e, None)\r\n\r\nFile \"<string>\" in raise_from\r\n\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/urllib3/connectionpool.py\" in _make_request\r\n  380.                     httplib_response = conn.getresponse()\r\n\r\nFile \"/opt/rh/rh-python35/root/usr/lib64/python3.5/http/client.py\" in getresponse\r\n  1174.                 response.begin()\r\n\r\nFile \"/opt/rh/rh-python35/root/usr/lib64/python3.5/http/client.py\" in begin\r\n  282.             version, status, reason = self._read_status()\r\n\r\nFile \"/opt/rh/rh-python35/root/usr/lib64/python3.5/http/client.py\" in _read_status\r\n  251.             raise RemoteDisconnected(\"Remote end closed connection without\"\r\n  \r\n    \r\n      During handling of the above exception (('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))), another exception occurred:\r\n    \r\n  \r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/django/core/handlers/exception.py\" in inner\r\n  41.             response = get_response(request)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/django/core/handlers/base.py\" in _get_response\r\n  178.             response = middleware_method(request, callback, callback_args, callback_kwargs)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/mezzanine/pages/middleware.py\" in process_view\r\n  99.                 return view_func(request, *view_args, **view_kwargs)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/django/views/generic/base.py\" in view\r\n  68.             return self.dispatch(request, *args, **kwargs)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/django/views/generic/base.py\" in dispatch\r\n  88.         return handler(request, *args, **kwargs)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/django/views/generic/detail.py\" in get\r\n  116.         context = self.get_context_data(object=self.object)\r\n\r\nFile \"/var/www/derridas-margins/derrida/books/views.py\" in get_context_data\r\n  501.             res = get_iiif_url(self.object.plain_text_url)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/djiffy/models.py\" in get_iiif_url\r\n  29.     return requests.get(url, **request_options)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/requests/api.py\" in get\r\n  72.     return request('get', url, params=params, **kwargs)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/requests/api.py\" in request\r\n  58.         return session.request(method=method, url=url, **kwargs)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/requests/sessions.py\" in request\r\n  512.         resp = self.send(prep, **send_kwargs)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/requests/sessions.py\" in send\r\n  622.         r = adapter.send(request, **kwargs)\r\n\r\nFile \"/var/www/derridas-margins/env/lib/python3.5/site-packages/requests/adapters.py\" in send\r\n  495.             raise ConnectionError(err, request=request)\r\n\r\nException Type: ConnectionError at /library/levi-strauss-la-pensee-sauvage-1962/gallery/p-285/\r\nException Value: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))\r\n```"},"comment":{"url":"https://api.github.com/repos/Princeton-CDH/derrida-django/issues/comments/424479518","html_url":"https://github.com/Princeton-CDH/derrida-django/issues/219#issuecomment-424479518","issue_url":"https://api.github.com/repos/Princeton-CDH/derrida-django/issues/219","id":424479518,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDQ3OTUxOA==","user":{"login":"rlskoeser","id":691231,"node_id":"MDQ6VXNlcjY5MTIzMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/691231?v=4","gravatar_id":"","url":"https://api.github.com/users/rlskoeser","html_url":"https://github.com/rlskoeser","followers_url":"https://api.github.com/users/rlskoeser/followers","following_url":"https://api.github.com/users/rlskoeser/following{/other_user}","gists_url":"https://api.github.com/users/rlskoeser/gists{/gist_id}","starred_url":"https://api.github.com/users/rlskoeser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlskoeser/subscriptions","organizations_url":"https://api.github.com/users/rlskoeser/orgs","repos_url":"https://api.github.com/users/rlskoeser/repos","events_url":"https://api.github.com/users/rlskoeser/events{/privacy}","received_events_url":"https://api.github.com/users/rlskoeser/received_events","type":"User","site_admin":false},"created_at":"2018-09-25T19:55:18Z","updated_at":"2018-09-25T19:55:18Z","author_association":"CONTRIBUTOR","body":"I've configured logging in QA and manually trigged an exception to confirm the logging is working correctly. I crawled the site with a scraper to see if I could trigger a connection error, but it's probably dependent on the library systems. I'm not sure how to force it, and am reasonably confident the fix is working the way we want, so I'm going to call it good."}}
{"actor":{"display_login":"rlskoeser"}}