Kallithea issues archive

Issue #249: [wait-for-feedback] waitress exception makes kallithea crash

Reported by: Louis-David Coulombe
State: closed
Created on: 2016-10-13 14:09
Updated on: 2018-06-09 20:36

Description

I sometimes get this error from Kallithea that makes the server crash completely. I have to restart it to make it work again.

Here is the log:

2016-10-13 01:26:32.508 ERROR [waitress] Exception when serving /Products/LSR/LWT/LWT/info/refs
Traceback (most recent call last):
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/waitress/channel.py", line 337, in service
    task.service()
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/waitress/task.py", line 173, in service
    self.execute()
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/waitress/task.py", line 392, in execute
    app_iter = self.channel.server.application(env, start_response)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/paste/gzipper.py", line 34, in __call__
    response.gzip_start_response)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/paste/cascade.py", line 130, in __call__
    return self.apps[-1](environ, start_response)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/paste/registry.py", line 379, in __call__
    app_iter = self.application(environ, start_response)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/kallithea/lib/middleware/wrapper.py", line 43, in __call__
    return self.application(environ, start_response)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/kallithea/lib/base.py", line 312, in __call__
    return self._handle_request(environ, start_response)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/kallithea/lib/middleware/simplegit.py", line 69, in _handle_request
    if not self._check_ssl(environ):
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/kallithea/lib/base.py", line 257, in _check_ssl
    if str2bool(Ui.get_by_key('push_ssl').ui_value):
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/kallithea/model/db.py", line 354, in get_by_key
    return cls.query().filter(cls.ui_key == key).scalar()
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2215, in scalar
    ret = self.one()
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2184, in one
    ret = list(self)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/kallithea/lib/caching_query.py", line 83, in __iter__
    return Query.__iter__(self)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2227, in __iter__
    return self._execute_and_instances(context)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1449, in execute
    params)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
    context)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
    context)
  File "/opt/kallithea/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (OperationalError) no such table: ui u'SELECT ui.ui_id AS ui_ui_id, ui.ui_section AS ui_ui_section, ui.ui_key AS ui_ui_key, ui.ui_value AS ui_ui_value, ui.ui_active AS ui_ui_active \nFROM ui \nWHERE ui.ui_key = ?' ('push_ssl',)

Any idea how to solve this ?

Attachments

Comments

Comment by Mads Kiilerich, on 2016-10-13 14:23

So apparently the database "disappears". What database are you using?

Are you using multiple threads? Try setting threads = 1 in the .ini file and see if it still happens.

Also, I guess http://kallithea.readthedocs.io/en/latest/overview.html#web-server should clarify that if using one of the simple web servers, then you need some extra process management for running it as a reliable service.

Comment by Louis-David Coulombe, on 2016-10-17 20:35

I'm using the default database.

I was in fact using multiple threads (5), I reduced it to 1 and I'll see if it fixes my issues.

Thanks for the support!

Comment by Thomas De Schampheleire, on 2018-05-18 20:15

Did this indeed solve your issue?

Comment by Thomas De Schampheleire, on 2018-06-09 20:36

Closing due to no further feedback from submitter.