Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-143

Validating Settings popup takes a long time

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Won't Fix
    • Affects Version/s: 1.3.1107
    • Fix Version/s: 1.4+
    • Component/s: GUI

      Description

      A few seconds, which was not the case before.
      Sometimes leads to a lock:

      2014-11-04 11:41:14,276 5254 140725878519552 DEBUG    nxdrive.synchronizer Sleeping 4.909s
      Traceback (most recent call last):
        File "/home/ataillefer/sources/nuxeo/addons/nuxeo-drive/nuxeo-drive-client/nxdrive/gui/settings.py", line 369, in accept
          if not self.callback(values, self):
        File "/home/ataillefer/sources/nuxeo/addons/nuxeo-drive/nuxeo-drive-client/nxdrive/gui/settings.py", line 538, in validate
          controller.set_proxy_settings(proxy_settings)
        File "/home/ataillefer/sources/nuxeo/addons/nuxeo-drive/nuxeo-drive-client/nxdrive/controller.py", line 372, in set_proxy_settings
          session.commit()
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 765, in commit
          self.transaction.commit()
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 370, in commit
          self._prepare_impl()
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 350, in _prepare_impl
          self.session.flush()
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1903, in flush
          self._flush(objects)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2021, in _flush
          transaction.rollback(_capture_exception=True)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 57, in __exit__
          compat.reraise(exc_type, exc_value, exc_tb)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1985, in _flush
          flush_context.execute()
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 370, in execute
          rec.execute(self)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 523, in execute
          uow
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 59, in save_obj
          mapper, table, update)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 510, in _emit_update_statements
          execute(statement, params)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 720, in execute
          return meth(self, multiparams, params)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 317, in _execute_on_connection
          return connection._execute_clauseelement(self, multiparams, params)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 817, in _execute_clauseelement
          compiled_sql, distilled_params
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 947, in _execute_context
          context)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1108, in _handle_dbapi_exception
          exc_info
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 185, in raise_from_cause
          reraise(type(exception), exception, tb=exc_tb)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 940, in _execute_context
          context)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 435, in do_execute
          cursor.execute(statement, parameters)
      sqlalchemy.exc.OperationalError: (OperationalError) database is locked u'UPDATE device_config SET proxy_password=? WHERE device_config.device_id = ?' (<read-only buffer for 0x36bb110, size -1, offset 0 at 0x39cfd70>, u'ecd92778640e11e49c67c8f733c9742b')
      

      Which then prevents the Settings popup from opening with thte following!

      2014-11-04 11:47:04,691 5254 140725878519552 DEBUG    nxdrive.synchronizer Sleeping 4.904s
      Traceback (most recent call last):
        File "/home/ataillefer/sources/nuxeo/addons/nuxeo-drive/nuxeo-drive-client/nxdrive/gui/application.py", line 629, in settings
          sb_settings = self.controller.get_server_binding_settings()
        File "/home/ataillefer/sources/nuxeo/addons/nuxeo-drive/nuxeo-drive-client/nxdrive/controller.py", line 442, in get_server_binding_settings
          server_bindings = self.list_server_bindings()
        File "/home/ataillefer/sources/nuxeo/addons/nuxeo-drive/nuxeo-drive-client/nxdrive/controller.py", line 428, in list_server_bindings
          return session.query(ServerBinding).all()
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2292, in all
          return list(self)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2404, in __iter__
          return self._execute_and_instances(context)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2417, in _execute_and_instances
          close_with_result=True)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2408, in _connection_from_session
          **kw)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 843, in connection
          close_with_result=close_with_result)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 847, in _connection_for_bind
          return self.transaction._connection_for_bind(engine)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 298, in _connection_for_bind
          self._assert_active()
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 210, in _assert_active
          % self._rollback_exception
      sqlalchemy.exc.InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (OperationalError) database is locked u'UPDATE device_config SET proxy_password=? WHERE device_config.device_id = ?' (<read-only buffer for 0x36bb110, size -1, offset 0 at 0x39cfd70>, u'ecd92778640e11e49c67c8f733c9742b')
      

        Attachments

          Activity

            People

            • Assignee:
              ataillefer Antoine Taillefer
              Reporter:
              ataillefer Antoine Taillefer
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: