{"action":"created","issue":{"url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1603","labels_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1603/labels{/name}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1603/comments","events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1603/events","html_url":"https://github.com/geoadmin/mf-chsdi3/issues/1603","id":100699920,"number":1603,"title":"Interface errors in mf-chsdi3","user":{"login":"cedricmoullet","id":319676,"avatar_url":"https://avatars.githubusercontent.com/u/319676?v=3","gravatar_id":"","url":"https://api.github.com/users/cedricmoullet","html_url":"https://github.com/cedricmoullet","followers_url":"https://api.github.com/users/cedricmoullet/followers","following_url":"https://api.github.com/users/cedricmoullet/following{/other_user}","gists_url":"https://api.github.com/users/cedricmoullet/gists{/gist_id}","starred_url":"https://api.github.com/users/cedricmoullet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cedricmoullet/subscriptions","organizations_url":"https://api.github.com/users/cedricmoullet/orgs","repos_url":"https://api.github.com/users/cedricmoullet/repos","events_url":"https://api.github.com/users/cedricmoullet/events{/privacy}","received_events_url":"https://api.github.com/users/cedricmoullet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ltclm","id":5286659,"avatar_url":"https://avatars.githubusercontent.com/u/5286659?v=3","gravatar_id":"","url":"https://api.github.com/users/ltclm","html_url":"https://github.com/ltclm","followers_url":"https://api.github.com/users/ltclm/followers","following_url":"https://api.github.com/users/ltclm/following{/other_user}","gists_url":"https://api.github.com/users/ltclm/gists{/gist_id}","starred_url":"https://api.github.com/users/ltclm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ltclm/subscriptions","organizations_url":"https://api.github.com/users/ltclm/orgs","repos_url":"https://api.github.com/users/ltclm/repos","events_url":"https://api.github.com/users/ltclm/events{/privacy}","received_events_url":"https://api.github.com/users/ltclm/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-08-13T06:33:13Z","updated_at":"2015-08-20T10:00:37Z","closed_at":null,"body":"[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61] mod_wsgi (pid=30722): Exception occurred processing WSGI script '/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/parts/modwsgi/wsgi'.\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61] Traceback (most recent call last):\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/pyramid-1.5.2-py2.7.egg/pyramid/router.py\", line 242, in __call__\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     response = self.invoke_subrequest(request, use_tweens=True)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/pyramid-1.5.2-py2.7.egg/pyramid/router.py\", line 217, in invoke_subrequest\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     response = handle_request(request)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/pyramid-1.5.2-py2.7.egg/pyramid/tweens.py\", line 21, in excview_tween\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     response = handler(request)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/pyramid_tm-0.12-py2.7.egg/pyramid_tm/__init__.py\", line 99, in tm_tween\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     reraise(*exc_info)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/pyramid_tm-0.12-py2.7.egg/pyramid_tm/__init__.py\", line 80, in tm_tween\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     response = handler(request)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/pyramid-1.5.2-py2.7.egg/pyramid/router.py\", line 163, in handle_request\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     response = view_callable(context, request)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/pyramid-1.5.2-py2.7.egg/pyramid/config/views.py\", line 218, in wrapper\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     response = view(context, request)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/pyramid-1.5.2-py2.7.egg/pyramid/config/views.py\", line 385, in viewresult_to_response\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     result = view(context, request)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/pyramid-1.5.2-py2.7.egg/pyramid/config/views.py\", line 472, in _class_requestonly_view\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     inst = view(request)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/chsdi/views/wmtscapabilities.py\", line 48, in __init__\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     self.hasMap(request.db, self.mapName)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/chsdi/lib/validation/__init__.py\", line 11, in hasMap\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     availableMaps = [q[0] for q in db.query(Topics.id)]\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/orm/query.py\", line 2438, in __iter__\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     return self._execute_and_instances(context)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/orm/query.py\", line 2453, in _execute_and_instances\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     result = conn.execute(querycontext.statement, self._params)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py\", line 729, in execute\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     return meth(self, multiparams, params)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/sql/elements.py\", line 322, in _execute_on_connection\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     return connection._execute_clauseelement(self, multiparams, params)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py\", line 826, in _execute_clauseelement\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     compiled_sql, distilled_params\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py\", line 893, in _execute_context\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     None, None)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py\", line 1159, in _handle_dbapi_exception\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     exc_info\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/util/compat.py\", line 199, in raise_from_cause\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     reraise(type(exception), exception, tb=exc_tb)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py\", line 889, in _execute_context\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     context = constructor(dialect, self, conn, *args)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/engine/default.py\", line 555, in _init_compiled\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     self.cursor = self.create_cursor()\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/dialects/postgresql/psycopg2.py\", line 368, in create_cursor\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     return self._dbapi_connection.cursor()\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]   File \"/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/pool.py\", line 769, in cursor\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61]     return self.connection.cursor(*args, **kwargs)\r\n[Thu Aug 13 08:31:30 2015] [error] [client 10.220.6.61] InterfaceError: (InterfaceError) connection already closed u'SELECT re3.topics.topic AS re3_topics_topic \\\\nFROM re3.topics' [immutabledict({})]\r\n"},"comment":{"url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/comments/132962481","html_url":"https://github.com/geoadmin/mf-chsdi3/issues/1603#issuecomment-132962481","issue_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1603","id":132962481,"user":{"login":"gjn","id":2572317,"avatar_url":"https://avatars.githubusercontent.com/u/2572317?v=3","gravatar_id":"","url":"https://api.github.com/users/gjn","html_url":"https://github.com/gjn","followers_url":"https://api.github.com/users/gjn/followers","following_url":"https://api.github.com/users/gjn/following{/other_user}","gists_url":"https://api.github.com/users/gjn/gists{/gist_id}","starred_url":"https://api.github.com/users/gjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjn/subscriptions","organizations_url":"https://api.github.com/users/gjn/orgs","repos_url":"https://api.github.com/users/gjn/repos","events_url":"https://api.github.com/users/gjn/events{/privacy}","received_events_url":"https://api.github.com/users/gjn/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T10:00:37Z","updated_at":"2015-08-20T10:00:37Z","body":"[This article](http://stackoverflow.com/questions/20217571/psycopg2-interfaceerror-connection-already-closed-pgr-astar) points to a potential crash of the db.\r\n\r\nIn any case, it looks liek the connection to the db was cut for some reason. Might be network, db or other reasons. Would certainly help to analyse postgres logs during those times. If have found other occurences at [other times (this is from one server only)](https://gist.github.com/gjn/1e176d809e9d49c7f2b3)\r\n\r\nI repeated some of the requests that gave this error (they are visible in the access.log with a 500 error around the same time) and couldn't reproduce. I therefore assume that not a specific request is triggering this error. \r\n\r\n@ltclm What do db logs tell?"}}