Repository: Flexget/Flexget

Issue:
Repeating OperationalError: (sqlite3.OperationalError) database is locked
I'm getting these errors, while my box upgrades itself at 4 AM using `unattended-upgrades`.
 There are some related tickets: #703, #336 and Trac issue [#3030](http://flexget.com/ticket/3030) - finally commit 0c74a6b

```
2016-03-29 04:00 ERROR    lazy_lookup   nC_movie-HUN    Unhandled error in lazy lookup plugin
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/lazy_dict.py", line 36, in __getitem__
    func(self.store)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/imdb_lookup.py", line 235, in lazy_loader
    self.lookup(entry)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugin.py", line 124, in wrapped_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/imdb_lookup.py", line 356, in lookup
    entry.update_using_map(self.field_map, movie)
  File "/usr/local/lib/python2.7/dist-packages/flexget/entry.py", line 266, in update_using_map
    v = value(source_item)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/imdb_lookup.py", line 212, in <lambda>
    'imdb_languages': lambda movie: [lang.language.name for lang in movie.languages],
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 237, in __get__
    return self.impl.get(instance_state(instance), dict_)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 583, in get
    value = self.callable_(state, passive)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 532, in _load_for_state
    return self._emit_lazyload(session, state, ident_key, passive)
  File "<string>", line 1, in <lambda>
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 602, in _emit_lazyload
    result = q.all()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2588, in all
    return list(self)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT imdb_movie_languages.movie_id AS imdb_movie_languages_movie_id, imdb_movie_languages.language_id AS imdb_movie_languages_language_id, imdb_movie_languages.prominence AS imdb_movie_languages_prominence \nFROM imdb_movie_languages \nWHERE ? = imdb_movie_languages.movie_id ORDER BY imdb_movie_languages.prominence'] [parameters: (1495,)]
```

```
2016-03-31 04:05 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task_queue.py", line 47, in run
    self.current_task.execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 69, in wrapper
    return func(self, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 579, in execute
    self._execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 511, in _execute
    last_hash = session.query(TaskConfigHash).filter(TaskConfigHash.task == self.name).first()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2634, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2457, in __getitem__
    return list(res)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT feed_config_hash.name AS feed_config_hash_name, feed_config_hash.id AS feed_config_hash_id, feed_config_hash.hash AS feed_config_hash_hash \nFROM feed_config_hash \nWHERE feed_config_hash.name = ?\n LIMIT ? OFFSET ?'] [parameters: (u'nC_notify-Progs', 1, 0)]
```

```
2016-04-01 03:57 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task_queue.py", line 47, in run
    self.current_task.execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 69, in wrapper
    return func(self, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 579, in execute
    self._execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 511, in _execute
    last_hash = session.query(TaskConfigHash).filter(TaskConfigHash.task == self.name).first()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2634, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2457, in __getitem__
    return list(res)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT feed_config_hash.name AS feed_config_hash_name, feed_config_hash.id AS feed_config_hash_id, feed_config_hash.hash AS feed_config_hash_hash \nFROM feed_config_hash \nWHERE feed_config_hash.name = ?\n LIMIT ? OFFSET ?'] [parameters: (u'nC_notify-Progs', 1, 0)]
```

```
2016-04-02 12:43 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2109, '2016-04-02 12:43:28.181146')]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 438, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 22, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/remember_rejected.py", line 94, in on_task_start
    filter(RememberEntry.expires < datetime.now()).delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3048, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2109, '2016-04-02 12:43:28.181146')]
```

1000th issue :) :100: 

Repeating OperationalError: (sqlite3.OperationalError) database is locked
I'm getting these errors, while my box upgrades itself at 4 AM using `unattended-upgrades`.
 There are some related tickets: #703, #336 and Trac issue [#3030](http://flexget.com/ticket/3030) - finally commit 0c74a6b

```
2016-03-29 04:00 ERROR    lazy_lookup   nC_movie-HUN    Unhandled error in lazy lookup plugin
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/lazy_dict.py", line 36, in __getitem__
    func(self.store)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/imdb_lookup.py", line 235, in lazy_loader
    self.lookup(entry)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugin.py", line 124, in wrapped_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/imdb_lookup.py", line 356, in lookup
    entry.update_using_map(self.field_map, movie)
  File "/usr/local/lib/python2.7/dist-packages/flexget/entry.py", line 266, in update_using_map
    v = value(source_item)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/imdb_lookup.py", line 212, in <lambda>
    'imdb_languages': lambda movie: [lang.language.name for lang in movie.languages],
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 237, in __get__
    return self.impl.get(instance_state(instance), dict_)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 583, in get
    value = self.callable_(state, passive)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 532, in _load_for_state
    return self._emit_lazyload(session, state, ident_key, passive)
  File "<string>", line 1, in <lambda>
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 602, in _emit_lazyload
    result = q.all()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2588, in all
    return list(self)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT imdb_movie_languages.movie_id AS imdb_movie_languages_movie_id, imdb_movie_languages.language_id AS imdb_movie_languages_language_id, imdb_movie_languages.prominence AS imdb_movie_languages_prominence \nFROM imdb_movie_languages \nWHERE ? = imdb_movie_languages.movie_id ORDER BY imdb_movie_languages.prominence'] [parameters: (1495,)]
```

```
2016-03-31 04:05 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task_queue.py", line 47, in run
    self.current_task.execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 69, in wrapper
    return func(self, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 579, in execute
    self._execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 511, in _execute
    last_hash = session.query(TaskConfigHash).filter(TaskConfigHash.task == self.name).first()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2634, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2457, in __getitem__
    return list(res)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT feed_config_hash.name AS feed_config_hash_name, feed_config_hash.id AS feed_config_hash_id, feed_config_hash.hash AS feed_config_hash_hash \nFROM feed_config_hash \nWHERE feed_config_hash.name = ?\n LIMIT ? OFFSET ?'] [parameters: (u'nC_notify-Progs', 1, 0)]
```

```
2016-04-01 03:57 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task_queue.py", line 47, in run
    self.current_task.execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 69, in wrapper
    return func(self, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 579, in execute
    self._execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 511, in _execute
    last_hash = session.query(TaskConfigHash).filter(TaskConfigHash.task == self.name).first()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2634, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2457, in __getitem__
    return list(res)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT feed_config_hash.name AS feed_config_hash_name, feed_config_hash.id AS feed_config_hash_id, feed_config_hash.hash AS feed_config_hash_hash \nFROM feed_config_hash \nWHERE feed_config_hash.name = ?\n LIMIT ? OFFSET ?'] [parameters: (u'nC_notify-Progs', 1, 0)]
```

```
2016-04-02 12:43 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2109, '2016-04-02 12:43:28.181146')]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 438, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 22, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/remember_rejected.py", line 94, in on_task_start
    filter(RememberEntry.expires < datetime.now()).delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3048, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2109, '2016-04-02 12:43:28.181146')]
```

1000th issue :) :100: 



Discussion:
@gazpachoking whats the best way to debug this?

can you run flexget with --debug-db-sessions when you get the error and paste the full log.

I am also getting the same "database is locked" error on mine. I'm not sure if this is in any way related to #846, as the resulting error is the same. The errors I am getting are as follows. The package appears to be different in mine (`pysqlite2.dbapi2.OperationalError`), but the statements appear to be on the same lines in code. I will run with --debug-db-sessions and post a crash log if/when one is generated.

```
2016-04-04 01:55 ERROR    lazy_lookup   fetch-series    Unhandled error in lazy lookup plugin
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/lazy_dict.py", line 36, in __getitem__
    func(self.store)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 109, in lazy_series_lookup
    return self.series_lookup(entry, self.series_map)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 102, in series_lookup
    tvdb_id=entry.get('tvdb_id', eval_lazy=False), session=session)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 27, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/api_tvdb.py", line 426, in lookup_series
    _update_search_strings(series, search=name)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/sqlalchemy_utils.py", line 137, in __exit__
    self.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 801, in commit
    self.transaction.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 392, in commit
    self._prepare_impl()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 372, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2019, in flush
    self._flush(objects)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2137, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2101, in _flush
    flush_context.execute()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
    rec.execute(self)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
    uow
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
    mapper, table, insert)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 800, in _emit_insert_statements
    execute(statement, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (pysqlite2.dbapi2.OperationalError) database is locked [SQL: u'INSERT INTO tvdb_search_results (search, series_id) VALUES (?, ?)'] [parameters: (u'chicago fire (2012)', 258541)]
```

```
2016-04-04 03:55 ERROR    lazy_lookup   fetch-series    Unhandled error in lazy lookup plugin
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/lazy_dict.py", line 36, in __getitem__
    func(self.store)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 109, in lazy_series_lookup
    return self.series_lookup(entry, self.series_map)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 102, in series_lookup
    tvdb_id=entry.get('tvdb_id', eval_lazy=False), session=session)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 27, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/api_tvdb.py", line 426, in lookup_series
    _update_search_strings(series, search=name)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/sqlalchemy_utils.py", line 137, in __exit__
    self.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 801, in commit
    self.transaction.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 392, in commit
    self._prepare_impl()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 372, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2019, in flush
    self._flush(objects)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2137, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2101, in _flush
    flush_context.execute()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
    rec.execute(self)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
    uow
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
    mapper, table, insert)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 800, in _emit_insert_statements
    execute(statement, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (pysqlite2.dbapi2.OperationalError) database is locked [SQL: u'INSERT INTO tvdb_search_results (search, series_id) VALUES (?, ?)'] [parameters: (u'chicago fire (2012)', 258541)]
```

```
2016-04-04 22:45 ERROR    lazy_lookup   fetch-series    Unhandled error in lazy lookup plugin
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/lazy_dict.py", line 36, in __getitem__
    func(self.store)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 109, in lazy_series_lookup
    return self.series_lookup(entry, self.series_map)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 102, in series_lookup
    tvdb_id=entry.get('tvdb_id', eval_lazy=False), session=session)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 27, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/api_tvdb.py", line 426, in lookup_series
    _update_search_strings(series, search=name)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/sqlalchemy_utils.py", line 137, in __exit__
    self.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 801, in commit
    self.transaction.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 392, in commit
    self._prepare_impl()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 372, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2019, in flush
    self._flush(objects)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2137, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2101, in _flush
    flush_context.execute()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
    rec.execute(self)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
    uow
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
    mapper, table, insert)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 800, in _emit_insert_statements
    execute(statement, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (pysqlite2.dbapi2.OperationalError) database is locked [SQL: u'INSERT INTO tvdb_search_results (search, series_id) VALUES (?, ?)'] [parameters: (u'chicago fire (2012)', 258541)]
```

can you please paste the full debug log with  --debug-db-sessions enabled.

Here is the full log with `flexget -L debug --debug-db-sessions execute --tasks fetch-series`. This is a fresh log file, created just for this execution, with no daemon running in the background. This is running 1.2.501.

```
2016-04-05 00:57 DEBUG    manager                       Figuring out config load paths
2016-04-05 00:57 DEBUG    manager                       Found config: /home/steven/.flexget/config.yml
2016-04-05 00:57 DEBUG    manager                       Config file /home/steven/.flexget/config.yml selected
2016-04-05 00:57 DEBUG    manager                       sys.defaultencoding: ascii
2016-04-05 00:57 DEBUG    manager                       sys.getfilesystemencoding: UTF-8
2016-04-05 00:57 DEBUG    manager                       os.path.supports_unicode_filenames: False
2016-04-05 00:57 DEBUG    plugin                        Trying to load plugins from: [u'/home/steven/.flexget/plugins', '/usr/local/lib/python2.7/dist-packages/flexget/plugins']
2016-04-05 00:57 DEBUG    safe                          Reading from cache file /tmp/safe-0.4.words.cache
2016-04-05 00:57 DEBUG    plugin                        Plugin `memusage` requires `ext lib `guppy`` to load.
2016-04-05 00:57 DEBUG    deluge                        ConfigManager started..
2016-04-05 00:57 DEBUG    plugin                        Plugins took 5.82 seconds to load
2016-04-05 00:57 DEBUG    manager                       Connecting to: sqlite:////home/steven/.flexget/db-config.sqlite
2016-04-05 00:57 DEBUG    manager                       config_name: config
2016-04-05 00:57 DEBUG    manager                       config_base: /home/steven/.flexget
2016-04-05 00:57 DEBUG    manager                       New config data loaded.
2016-04-05 00:57 DEBUG    parsing                       setting default movie parser to internal. (options: {u'internal': <flexget.plugins.parsers.parser_internal.ParserInternal object at 0x7fb1e11cde10>, u'guessit': <flexget.plugins.parsers.parser_guessit.ParserGuessit object at 0x7fb1e11a84d0>})
2016-04-05 00:57 DEBUG    parsing                       setting default series parser to internal. (options: {u'internal': <flexget.plugins.parsers.parser_internal.ParserInternal object at 0x7fb1e11cde10>, u'guessit': <flexget.plugins.parsers.parser_guessit.ParserGuessit object at 0x7fb1e11a84d0>})
2016-04-05 00:57 DEBUG    cron_env                      Encoding UTF-8 stored
2016-04-05 00:57 DEBUG    util.simple_persistence                 setting key terminal_encoding value 'UTF-8'
2016-04-05 00:57 DEBUG    task_queue                    task queue shutdown requested
2016-04-05 00:57 VERBOSE  task_queue                    There are 1 tasks to execute. Shutdown will commence when they have completed.
2016-04-05 00:57 INFO     ipc.rpyc                      server started on [127.0.0.1]:42506
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DE715A50 opened ('flexget.utils.simple_persistence', 134, 'load', 'for skv in session.query(SimpleKeyValue).filter(SimpleKeyValue.task == task).all():')
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DE715A50 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.0244059562683)
2016-04-05 00:57 DEBUG    task          fetch-series    executing fetch-series
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DE715D90 opened ('flexget.task', 511, '_execute', 'last_hash = session.query(TaskConfigHash).filter(TaskConfigHash.task == self.name).first()')
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DE715D90 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.0242478847504)
2016-04-05 00:57 DEBUG    template      fetch-series    Merging template global into task fetch-series
2016-04-05 00:57 DEBUG    logfilter     fetch-series    Log filter 140401899576656 added (context "series", term "is already configured in series plugin")
2016-04-05 00:57 DEBUG    logfilter     fetch-series    Log filter 140401899576720 added (context "parser_internal", term "appears to be an episode pack")
2016-04-05 00:57 DEBUG    disable       fetch-series    Disabled built-in plugin(s): entry_operations, template, scan_imdb, torrent_files, backlog, change_warn, include, nzb_size, retry_failed, torrent_cache, torrent_size, metainfo_content_size, proxy, urlrewriting, verbose, dump, urlfix, seen_info_hash, remember_rejected, metainfo_task, torrent, history, seen, details, dump_config, series_db, --try-regexp, metainfo_quality, magnet_btih
2016-04-05 00:57 DEBUG    exec          fetch-series    phase cmd: rm -f '/tmp/trakt_series.txt' && touch '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: rm -f '/tmp/trakt_series.txt' && touch '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    input_cache   fetch-series    cache name: trakt_list_871e06b74ced311c907be93dbb7c6f20 (has: )
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD5A7750 opened ('flexget.utils.cached_input', 129, 'wrapped_func', 'filter(InputCache.added > datetime.now() - self.persist).\\')
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD5A7750 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.0287930965424)
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD5995D0 opened ('flexget.plugins.api_trakt', 125, 'get_access_token', 'acc = session.query(TraktUserAuth).filter(TraktUserAuth.account == account).first()')
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD5995D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.0270419120789)
2016-04-05 00:57 VERBOSE  trakt_list    fetch-series    Retrieving `shows` list `series`
2016-04-05 00:57 DEBUG    utils.requests fetch-series    Fetching https://api-v2launch.trakt.tv/users/me/lists/series/items
2016-04-05 00:57 DEBUG    input_cache   fetch-series    storing to cache trakt_list_871e06b74ced311c907be93dbb7c6f20 48 entries
2016-04-05 00:57 DEBUG    input_cache   fetch-series    Storing cache trakt_list_871e06b74ced311c907be93dbb7c6f20 to database.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD58CE50 opened ('flexget.utils.cached_input', 177, 'wrapped_func', 'filter(InputCache.hash == hash).first()')
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD58CE50 writing ('flexget.utils.cached_input', 182, 'wrapped_func', 'session.merge(db_cache)') new: (<flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf73d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7550>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced550>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7450>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf74d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7150>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced510>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd58cf90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced590>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced5d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7650>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf76d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced710>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7750>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7850>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced890>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf78d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced910>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7950>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced990>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcceda10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcceda90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedb10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedb90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedc10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced3d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedc90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedd10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7350>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedd90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced410>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccede10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd58ce90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd58ced0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedf10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf77d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedf90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7050>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf75d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf70d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced110>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced150>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced4d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf71d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7250>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccede90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf72d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced850>) deleted: () dirty: (<flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09350>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd098d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd093d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09450>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f490>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd094d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd5a7d90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f3d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd095d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f650>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09650>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd5b8690>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd096d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f790>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f850>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd5998d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f910>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09950>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1de7158d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd099d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09d50>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09a90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1fad0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09b10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09b90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7bd0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd5a7c10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09c50>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7c90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f550>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09750>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09dd0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd5a7b10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd599e10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09e50>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd60fe90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09ed0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09f50>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f9d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f050>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f110>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09850>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7d50>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09190>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f1d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09550>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09250>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f2d0>, <flexget.utils.cached_input.InputCache object at 0x7fb1dcced790>)
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD58CE50 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.467740058899)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase on_input not configured
2016-04-05 00:57 DEBUG    exec          fetch-series    phase on_filter not configured
2016-04-05 00:57 DEBUG    exec          fetch-series    running phase_name: on_output operation: for_entries entries: 48
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Elementary (2012) 255316
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCCED8D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Getting updates from thetvdb (1459824232)
2016-04-05 00:57 DEBUG    util.simple_persistence fetch-series    setting key auth_tokens value {u'default': u'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NTk4MzU3MzAsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDU5NzQ5MzMwfQ.Q0IVv0spOPI1Wasc-IzZZLyhKYlYecYNC6XtSVnKede4daOnwbvHkuSTI4Na3tELITXfP1OD77M7znDvZrDJ2w134XsBt5VNAEgkARzQxx1ifIE1jPPNYriPVzphetII8Rlr6B7g4ChALmXV1kKPqBUL_Dai-76v6NV6UZm5Lw7bTsZhB3nfadBz7___MaOunowNutp0oRCkymhL5ZxaDPstwseGrh5HJ7QgVgV8j_WEPV7ZFJv4-FtHhNQMG17wmWxFLNfwbMD2H-bOTvceU5oOZTLbuIqfa6rMJccrhhejkNzm7YvBvbMjyOLvECq70SLq0FW1TXKAhSd8tV-g3w'}
2016-04-05 00:57 DEBUG    utils.requests fetch-series    Fetching https://api-beta.thetvdb.com/updated/query
2016-04-05 00:57 DEBUG    util.simple_persistence fetch-series    setting key last_check value datetime.datetime(2016, 4, 5, 4, 57, 30, 670744)
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Elementary (2012),tvdb_id=255316> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCCED8D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.612282991409)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Elementary" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Elementary" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Homeland (2011) 247897
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCCED0D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Homeland (2011),tvdb_id=247897> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCCED0D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.109487056732)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Homeland" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Homeland" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Once Upon a Time (2011) 248835
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC81850 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Once Upon a Time (2011),tvdb_id=248835> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC81850 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110621929169)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Once Upon a Time (2011)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Once Upon a Time (2011)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Originals (2013) 266883
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D7D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Originals (2013),tvdb_id=266883> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D7D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.112577915192)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Originals" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Originals" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Sleepy Hollow (2013) 269578
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D790 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Sleepy Hollow (2013),tvdb_id=269578> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D790 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.106371879578)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Sleepy Hollow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Sleepy Hollow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Marvel's Agents of S.H.I.E.L.D. (2013) 263365
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8DD10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Marvel's Agents of S.H.I.E.L.D. (2013),tvdb_id=263365> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8DD10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.107441186905)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Marvels Agents of S.H.I.E.L.D." >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Marvels Agents of S.H.I.E.L.D." >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Vampire Diaries (2009) 95491
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D0D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Vampire Diaries (2009),tvdb_id=95491> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D0D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110584974289)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Vampire Diaries" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Vampire Diaries" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Blacklist (2013) 266189
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D850 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Blacklist (2013),tvdb_id=266189> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D850 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.105668783188)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Blacklist" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Blacklist" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Big Bang Theory (2007) 80379
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCD16D90 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Big Bang Theory (2007),tvdb_id=80379> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCD16D90 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.107741117477)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Big Bang Theory" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Big Bang Theory" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Chicago Fire (2012) 258541
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D9D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 VERBOSE  api_tvdb      fetch-series    Data for Chicago Fire has expired, refreshing from tvdb
2016-04-05 00:57 DEBUG    util.simple_persistence fetch-series    setting key auth_tokens value {u'default': u'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NTk4MzU3MzAsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDU5NzQ5MzMwfQ.Q0IVv0spOPI1Wasc-IzZZLyhKYlYecYNC6XtSVnKede4daOnwbvHkuSTI4Na3tELITXfP1OD77M7znDvZrDJ2w134XsBt5VNAEgkARzQxx1ifIE1jPPNYriPVzphetII8Rlr6B7g4ChALmXV1kKPqBUL_Dai-76v6NV6UZm5Lw7bTsZhB3nfadBz7___MaOunowNutp0oRCkymhL5ZxaDPstwseGrh5HJ7QgVgV8j_WEPV7ZFJv4-FtHhNQMG17wmWxFLNfwbMD2H-bOTvceU5oOZTLbuIqfa6rMJccrhhejkNzm7YvBvbMjyOLvECq70SLq0FW1TXKAhSd8tV-g3w'}
2016-04-05 00:57 DEBUG    utils.requests fetch-series    Fetching https://api-beta.thetvdb.com/series/258541
2016-04-05 00:57 WARNING  debug_db_sess fetch-series    Sessions from 2 threads! Transaction 0x7FB1DCCED9D0 opened ('flexget.plugins.api_tvdb', 108, '_get_db_genres', 'genre = session.query(TVDBGenre).filter(func.lower(TVDBGenre.name) == genre_name.lower()).first()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0x7fb1dcc8d9d0>: (1459832254.061676, <sqlalchemy.pool._ConnectionFairy object at 0x7fb1dcc8d8d0>, 'flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')}
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCCED9D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.132996082306)
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D9D0 writing ('flexget.plugins.api_tvdb', 372, '_update_search_strings', 'search_strings = series.search_strings') new: () deleted: () dirty: (<TVDBSeries name=Chicago Fire,tvdb_id=258541>, <flexget.plugins.api_tvdb.TVDBGenre object at 0x7fb1dcc41650>, <flexget.plugins.api_tvdb.TVDBGenre object at 0x7fb1dcc415d0>)
2016-04-05 00:57 WARNING  debug_db_sess fetch-series    Sessions from 2 threads! Transaction 0x7FB1DCC41550 opened ('flexget.plugins.api_tvdb', 377, '_update_search_strings', 'func.lower(TVDBSearchResult.search) == name).first()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0x7fb1dcc8d9d0>: (1459832254.061676, <sqlalchemy.pool._ConnectionFairy object at 0x7fb1dcc8d8d0>, 'flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')}
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC41550 writing ('flexget.plugins.api_tvdb', 377, '_update_search_strings', 'func.lower(TVDBSearchResult.search) == name).first()') new: () deleted: () dirty: (<flexget.plugins.api_tvdb.TVDBSearchResult object at 0x7fb1dcbff710>,)
2016-04-05 00:57 WARNING  debug_db_sess fetch-series    Transaction 0x7FB1DCC41550 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.close()') (open time 10.3630418777)
2016-04-05 00:57 WARNING  debug_db_sess fetch-series    Transaction 0x7FB1DCC8D9D0 closed ('flexget.utils.sqlalchemy_utils', 139, '__exit__', 'self.rollback()') (open time 11.6950700283)
2016-04-05 00:57 ERROR    lazy_lookup   fetch-series    Unhandled error in lazy lookup plugin
2016-04-05 00:57 CRITICAL manager       fetch-series    An unexpected crash has occurred. Writing crash report to /home/steven/.flexget/crash_report.2016.04.05.005745833110.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 1.2.501
2016-04-05 00:57 DEBUG    manager       fetch-series    Traceback:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/lazy_dict.py", line 36, in __getitem__
    func(self.store)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 109, in lazy_series_lookup
    return self.series_lookup(entry, self.series_map)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 102, in series_lookup
    tvdb_id=entry.get('tvdb_id', eval_lazy=False), session=session)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 27, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/api_tvdb.py", line 426, in lookup_series
    _update_search_strings(series, search=name)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/sqlalchemy_utils.py", line 137, in __exit__
    self.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 801, in commit
    self.transaction.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 392, in commit
    self._prepare_impl()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 372, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2019, in flush
    self._flush(objects)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2137, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2101, in _flush
    flush_context.execute()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
    rec.execute(self)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
    uow
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
    mapper, table, insert)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 800, in _emit_insert_statements
    execute(statement, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (pysqlite2.dbapi2.OperationalError) database is locked [SQL: u'INSERT INTO tvdb_search_results (search, series_id) VALUES (?, ?)'] [parameters: (u'chicago fire (2012)', 258541)]
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "None" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "None" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Vikings (2013) 260449
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D890 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Vikings (2013),tvdb_id=260449> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D890 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.106513023376)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Vikings" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Vikings" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Fosters (2013) 267907
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D190 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Fosters (2013),tvdb_id=267907> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D190 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.107897043228)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Fosters (2013)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Fosters (2013)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for TURN: Washington's Spies (2014) 272135
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFA50 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=TURN: Washington's Spies (2014),tvdb_id=272135> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFA50 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.107362031937)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "TURN: Washingtons Spies" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "TURN: Washingtons Spies" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Call the Midwife (2012) 255192
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Call the Midwife (2012),tvdb_id=255192> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.109475851059)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Call the Midwife" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Call the Midwife" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Nashville (2012) 259055
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC41550 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Nashville (2012),tvdb_id=259055> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC41550 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.104348897934)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Nashville (2012)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Nashville (2012)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for House of Lies (2012) 247909
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF250 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=House of Lies (2012),tvdb_id=247909> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF250 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.105333089828)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "House of Lies" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "House of Lies" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Halt and Catch Fire (2014) 271910
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF590 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Halt and Catch Fire (2014),tvdb_id=271910> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF590 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.108228206635)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Halt and Catch Fire" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Halt and Catch Fire" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Minority Report (2015) 295680
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Minority Report (2015),tvdb_id=295680> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.105751991272)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Minority Report" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Minority Report" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Quantico (2015) 295515
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD90 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Quantico (2015),tvdb_id=295515> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD90 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.105674982071)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Quantico" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Quantico" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for DC's Legends of Tomorrow (2016) 295760
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AA10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=DC's Legends of Tomorrow (2016),tvdb_id=295760> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AA10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.10710477829)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "DCs Legends of Tomorrow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "DCs Legends of Tomorrow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Limitless (2015) 295743
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AA10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Limitless (2015),tvdb_id=295743> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AA10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.113322019577)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Limitless" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Limitless" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Ripper Street (2012) 260485
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AFD0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Ripper Street (2012),tvdb_id=260485> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AFD0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.11244893074)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Ripper Street" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Ripper Street" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Family Guy (1999) 75978
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF810 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Family Guy (1999),tvdb_id=75978> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF810 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.120397090912)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Family Guy" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Family Guy" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Simpsons (1989) 71663
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AF10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Simpsons (1989),tvdb_id=71663> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AF10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.113327980042)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Simpsons" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Simpsons" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Arrow (2012) 257655
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A210 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Arrow (2012),tvdb_id=257655> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A210 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110754966736)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Arrow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Arrow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Modern Family (2009) 95011
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF790 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Modern Family (2009),tvdb_id=95011> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF790 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110137939453)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Modern Family" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Modern Family" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Musketeers (2014) 269159
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFE10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Musketeers (2014),tvdb_id=269159> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFE10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.128804922104)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Musketeers" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Musketeers" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Flash (2014) 279121
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF250 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Flash (2014),tvdb_id=279121> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF250 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.11040186882)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Flash (2014)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Flash (2014)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Brooklyn Nine-Nine (2013) 269586
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A590 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Brooklyn Nine-Nine (2013),tvdb_id=269586> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A590 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.112406015396)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Brooklyn Nine-Nine" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Brooklyn Nine-Nine" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Black Sails (2014) 262407
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Black Sails (2014),tvdb_id=262407> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110274076462)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Black Sails" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Black Sails" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Faking It (2014) 277169
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3ACD0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Faking It (2014),tvdb_id=277169> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3ACD0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.109177112579)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Faking It (2014)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Faking It (2014)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Lucifer (2016) 295685
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF190 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Lucifer (2016),tvdb_id=295685> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF190 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110256910324)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Lucifer" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Lucifer" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Bitten (2014) 269550
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF490 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Bitten (2014),tvdb_id=269550> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF490 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.109037160873)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Bitten" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Bitten" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for 2 Broke Girls (2011) 248741
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF190 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=2 Broke Girls (2011),tvdb_id=248741> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF190 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.11101603508)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "2 Broke Girls" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "2 Broke Girls" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Strain (2014) 276564
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A850 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Strain (2014),tvdb_id=276564> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A850 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.112704992294)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Strain" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Strain" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Penny Dreadful (2014) 265766
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AC50 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Penny Dreadful (2014),tvdb_id=265766> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AC50 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.111121177673)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Penny Dreadful" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Penny Dreadful" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for New Girl (2011) 248682
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D890 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=New Girl (2011),tvdb_id=248682> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D890 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.115052938461)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "New Girl" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "New Girl" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Project Runway (2004) 74285
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD90 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Project Runway (2004),tvdb_id=74285> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD90 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.122241020203)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Project Runway" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Project Runway" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Person of Interest (2011) 248742
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF690 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Person of Interest (2011),tvdb_id=248742> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF690 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.114757061005)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Person of Interest" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Person of Interest" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Project Runway All Stars (2012) 253682
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Project Runway All Stars (2012),tvdb_id=253682> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.11353802681)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Project Runway All Stars" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Project Runway All Stars" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Project Runway Junior (2015) 300486
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Project Runway Junior (2015),tvdb_id=300486> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.111170053482)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Project Runway Junior" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Project Runway Junior" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Girls (2012) 220411
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Girls (2012),tvdb_id=220411> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.121407032013)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Girls" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Girls" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Americans (2013) 261690
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A0D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Americans (2013),tvdb_id=261690> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A0D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.120532989502)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Americans (2013)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Americans (2013)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Line of Duty (2012) 260092
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8DDD0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Line of Duty (2012),tvdb_id=260092> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8DDD0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.112644910812)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Line of Duty" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Line of Duty" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Grimm (2011) 248736
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD50 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Grimm (2011),tvdb_id=248736> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD50 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.113950967789)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Grimm" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Grimm" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for True Detective (2014) 270633
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A5D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=True Detective (2014),tvdb_id=270633> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A5D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.114617109299)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "True Detective" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "True Detective" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Devious Maids (2013) 261802
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AB10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Devious Maids (2013),tvdb_id=261802> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AB10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.11248087883)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Devious Maids" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Devious Maids" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Blunt Talk (2015) 281181
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF510 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Blunt Talk (2015),tvdb_id=281181> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF510 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.115611076355)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Blunt Talk" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Blunt Talk" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    exec          fetch-series    phase cmd: echo "Done!"
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Done!"
2016-04-05 00:57 INFO     exec          fetch-series    Stdout: Done!\n
2016-04-05 00:57 DEBUG    disable       fetch-series    Re-enabled builtin plugin(s): entry_operations, template, scan_imdb, torrent_files, backlog, change_warn, include, nzb_size, retry_failed, torrent_cache, torrent_size, metainfo_content_size, proxy, urlrewriting, verbose, dump, urlfix, seen_info_hash, remember_rejected, metainfo_task, torrent, history, seen, details, dump_config, series_db, --try-regexp, metainfo_quality, magnet_btih
2016-04-05 00:57 DEBUG    logfilter     fetch-series    Log filter 140401899576656 removed
2016-04-05 00:57 DEBUG    logfilter     fetch-series    Log filter 140401899576720 removed
2016-04-05 00:57 DEBUG    util.simple_persistence fetch-series    Flushing simple persistence for task fetch-series to db.
2016-04-05 00:57 DEBUG    task_queue                    task queue shut down
2016-04-05 00:57 INFO     ipc.rpyc                      listener closed
2016-04-05 00:57 INFO     ipc.rpyc                      server has terminated
2016-04-05 00:57 DEBUG    util.simple_persistence                 Flushing simple persistence for task None to db.
2016-04-05 00:57 DEBUG    debug_db_sess                 Transaction 0x7FB1DCB4D490 opened ('flexget.utils.simple_persistence', 153, 'flush', 'synchronize_session=False')
2016-04-05 00:57 DEBUG    debug_db_sess                 Transaction 0x7FB1DCB4D490 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.241051912308)
2016-04-05 00:57 DEBUG    manager                       Shutting down
2016-04-05 00:57 DEBUG    manager                       Removed /home/steven/.flexget/.config-lock
```

It doesn't seem to be resolved yet, v1.2.502:

``` logtalk
2016-04-06 03:54 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.OperationalError) database is
 locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [paramet
ers: (2124, '2016-04-06 03:54:00.945351')]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 438, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 22, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/remember_rejected.py", line 94, in on_task_start
    filter(RememberEntry.expires < datetime.now()).delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3048, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2124, '2016-04-06 03:54:00.945351')]
```

i dont think this has anything to do with tvdb.. no  idea whats causing it..

which os are you on?

It is OSMC (Raspbian - Debian 8), latest updates, on RPi 1 Model B, 256 MB RAM, ext4 on sdcard.

1.2.503 appeared to fix the issue for me, which I believe is where the patch is. The database locked issue appears to be a larger issue though, as there are other issues with similar 'database is locked' errors. I am no longer getting any errors like this on mine. I am using Ubuntu 14.04 (Kodi) on an older computer (~5-6 years old). Since I have switched from the UpStart script, and using cron to initiate the daemon mode on login, I have had no other issues with locked databases, including the one causing flexget to stop working with the scheduler.

Sorry, unfortunately I can't confirm this, since I've got this today with 1.2.505:

``` logtalk
 2016-04-09 04:15 CRITICAL task          nC_notify-Progs BUG: Unhandled error
in plugin remember_rejected: (sqlite3.OperationalError) database is locked [S
QL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2124, '2016-04
-09 04:15:34.922301')]
Traceback (most recent call last):                                             File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 438, in
 __run_plugin
    return method(*args, **kwargs)                                             File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 22, in
 __call__
    return self.func(*args, **kwargs)                                          File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/remembe
r_rejected.py", line 94, in on_task_start
    filter(RememberEntry.expires < datetime.now()).delete()                    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line
 3048, in delete
    delete_op.exec_()                                                          File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py"
, line 1127, in exec_
    self._do_exec()                                                            File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec                                                         mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2124, '2016-04-09 04:15:34.922301')]
```

can you run task with `--debug-db-sessions`?

Sure, I've started daemon with that switch. I'll comment back, if the crash occurs.

Here, you got one:
`$ flexget database cleanup && flexget database vacuum`

``` logtalk
There is a FlexGet process already running for this config, sending execution there.
2016-04-15 16:01 INFO     manager                       Running database cleanup.
2016-04-15 16:01 WARNING  debug_db_sess                 Sessions from 2 threads! Transaction 0xB348E5F0 opened ('flexget.utils.simple_persistence', 71, 'db_cleanup', 'session.query(SimpleKeyValue).filter(~SimpleKeyValue.task.in_(existing_tasks)).delete(synchronize_session=False)') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb195e730>: (1460728871.683226, <sqlalchemy.pool._ConnectionFairy object at 0xb348e2b0>, 'flexget.plugins.filter.series', 1608, 'on_task_start', 'session.query(SeriesTask).filter(SeriesTask.name == task.name).delete()')}
2016-04-15 16:01 VERBOSE  util.log                      Purged 106 entries from log_once table.
2016-04-15 16:01 VERBOSE  series                        Removed 6 undownloaded episode releases.
2016-04-15 16:01 VERBOSE  series                        Removed 1 series without episodes.
2016-04-15 16:01 INFO     db_analyze                    Running ANALYZE on database to improve performance.
2016-04-15 16:01 WARNING  debug_db_sess                 Transaction 0xB348E5F0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 10.5224280357)
2016-04-15 16:01 WARNING  debug_db_sess                 Sessions from 2 threads! Transaction 0xB3E6EE30 opened ('flexget.task', 55, 'config_changed', 'task_hash.delete()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb195eeb0>: (1460728880.923322, <sqlalchemy.pool._ConnectionFairy object at 0xb19279d0>, 'flexget.plugins.filter.remember_rejected', 83, 'on_task_start', 'old_task = session.query(RememberTask).filter(RememberTask.name == task.name).first()')}
2016-04-15 16:01 WARNING  debug_db_sess                 Transaction 0xB3E6EE30 closed ('flexget.utils.sqlalchemy_utils', 139, '__exit__', 'self.rollback()') (open time 17.0491540432)
Traceback (most recent call last):
  File "/usr/local/bin/flexget", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/flexget/__init__.py", line 37, in main
    manager.start()
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 286, in start
    client.handle_cli(self.args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 196, in __call__
    return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 71, in syncreq
    return conn.sync_request(handler, oid, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 441, in sync_request
    raise obj
rpyc.core.vinegar/sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked

========= Remote Traceback (1) =========
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 305, in _dispatch_request
    res = self._HANDLERS[handler](self, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 535, in _handle_call
    return self._local_objects[oid](*args, **dict(kwargs))
  File "/usr/local/lib/python2.7/dist-packages/flexget/ipc.py", line 79, in exposed_handle_cli
    self.manager.handle_cli(options)
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 330, in handle_cli
    options.cli_command_callback(self, command_options)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/cli/database.py", line 13, in do_cli
    cleanup(manager)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/cli/database.py", line 23, in cleanup
    manager.db_cleanup(force=True)
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 838, in db_cleanup
    self.config_changed()
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 613, in config_changed
    config_changed()
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 55, in config_changed
    task_hash.delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3048, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM feed_config_hash']
```

this still an issue?

Yes it is, I can still reproduce with the command I wrote in my previous comment: `$ flexget database cleanup && flexget database vacuum`

any change i can get a copy of your db and config? I can't reproduce the problem so it's hard to t-shoot.

Yes, I can send you the config & the DB (via IRC), but I don't know, does my DB contains any sensitive data? (Like what I'm hiding from main config, using the secrets plugin)

I don't think anything sensitive is in there but i can't be 100% sure as i haven't seen how all the plugin work.

Ok, I'll check that and send you during the weekend.

Meanwhile, I got some other kind of bug here, what is used to happen also - it happens while the unattended upgrades are running about 4 AM:

``` logtalk
2016-04-21 03:53 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB1010EF0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 18.3665368557)0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 3.19134020805)
2016-04-21 03:43 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB0D6F890 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.04611611366)
2016-04-21 03:43 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB10254F0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.1364710331)
2016-04-21 03:43 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB08953B0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.3491089344)
2016-04-21 03:43 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB1A22AF0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.78661489487)
2016-04-21 03:44 WARNING  debug_db_sess nC_auto         Transaction 0xB155EB7
2016-04-21 03:43 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB1A22AF0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.78661489487)
2016-04-21 03:44 WARNING  debug_db_sess nC_auto         Transaction 0xB155EB70 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.69811081886)
2016-04-21 03:44 WARNING  debug_db_sess nC_auto         Transaction 0xB0D6F910 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.76001906395)
2016-04-21 03:44 WARNING  debug_db_sess nC_auto         Transaction 0xB0886970 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.75373601913)
2016-04-21 03:53 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB1010EF0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 18.3665368557)
2016-04-21 03:55 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB10047F0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 16.8824019432)
2016-04-21 03:55 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin retry_failed: (sqlite3.OperationalError) disk I/O error [SQL: u'SELECT failed.id AS failed_id, failed.title AS failed_title, failed.url AS failed_url, failed.tof AS failed_tof, failed.reason AS failed_reason, failed.count AS failed_count, failed.retry_time AS failed_retry_time \nFROM failed \nWHERE failed.title = ? AND failed.url = ?\n LIMIT ? OFFSET ?'] [parameters: (u'SomeStuff [Series (HD)]', u'https://site.tldtorrents.php?action=details&id=195904', 1, 0)]
2016-04-21 03:55 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0B63570 closed ('flexget.utils.sqlalchemy_utils', 139, '__exit__', 'self.rollback()') (open time 9.22885513306)
2016-04-21 03:55 CRITICAL task_queue                    BUG: Unhandled exception during task queue run loop.
2016-04-21 03:55 WARNING  debug_db_sess                 Transaction 0xB1093210 closed ('flexget.utils.sqlalchemy_utils', 139, '__exit__', 'self.rollback()') (open time 2.02223086357)
2016-04-21 04:10 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 
2016-04-21 04:08:46 CEST)" skipped: maximum number of running instances reached (1)                      
2016-04-21 04:24 WARNING  apscheduler.scheduler                 Execution of job "nC_notify* (trigger: interval[0:26:00], next run at: 
2016-04-21 04:24:46 CEST)" skipped: maximum number of running instances reached (1)             
2016-04-21 04:24 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 
2016-04-21 04:24:46 CEST)" skipped: maximum number of running instances reached (1)                      
2016-04-21 04:40 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 
2016-04-21 04:40:46 CEST)" skipped: maximum number of running instances reached (1)                      
2016-04-21 04:50 WARNING  apscheduler.scheduler                 Execution of job "nC_notify* (trigger: interval[0:26:00], next run at: 
2016-04-21 04:50:46 CEST)" skipped: maximum number of running instances reached (1)             
2016-04-21 04:56 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 
2016-04-21 04:56:46 CEST)" skipped: maximum number of running instances reached (1)                      
2016-04-21 05:12 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 
2016-04-21 05:12:46 CEST)" skipped: maximum number of running instances reached (1)
```

I also had 2 empty crash_report files, but I have plenty of free space...

I've got a new one with version 2.0.4. It is about the daily unattended upgrades, running about 4 AM.

``` logtalk
crash_report.2016.04.27.042603877947.log 
2016-04-27 03:40 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB08B67B0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.00965595245)
2016-04-27 03:40 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB08B6E50 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.26596903801)
2016-04-27 03:40 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB0C45590 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.77572894096)
2016-04-27 03:40 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xAEDBBED0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.84089612961)
2016-04-27 03:41 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB0C45BB0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.23526716232)
2016-04-27 03:41 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB176DD50 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 10.3584480286)
2016-04-27 03:41 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB06BB410 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.62133002281)
2016-04-27 03:41 WARNING  debug_db_sess nC_auto         Transaction 0xB345DC30 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.98676800728)
2016-04-27 03:42 WARNING  debug_db_sess nC_auto         Transaction 0xB06BBD30 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.0725839138)
2016-04-27 03:42 WARNING  debug_db_sess nC_auto         Transaction 0xB0CD8BB0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.2459230423)
2016-04-27 03:42 WARNING  debug_db_sess nC_auto         Transaction 0xB0A248F0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.11289286613)
2016-04-27 03:42 WARNING  debug_db_sess nC_auto         Transaction 0xB21AF910 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.78115200996)
2016-04-27 03:51 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0AC65D0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.05061006546)
2016-04-27 03:51 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0AC6770 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.11864805222)
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Transaction 0xB17ED450 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.05437803268)
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB0A3CE90 opened ('flexget.plugins.metainfo.imdb_lookup', 316, 'lookup', "result = session.query(SearchResult).filter(SearchResult.title == entry['title']).first()") Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB0A3C6D0 opened ('flexget.plugins.metainfo.imdb_lookup', 316, 'lookup', "result = session.query(SearchResult).filter(SearchResult.title == entry['title']).first()") Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB0A3C030 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB0A3C890 opened ('flexget.plugins.api_tmdb', 204, 'lookup', 'movie = movie_filter.first()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08B6AB0 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08B6EB0 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Transaction 0xB0A3C610 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.2348690033)
2016-04-27 03:53 WARNING  debug_db_sess nC_manual       Transaction 0xB17EAE90 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.03774690628)
2016-04-27 03:53 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB17ED7F0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.58236002922)
2016-04-27 03:54 WARNING  debug_db_sess nC_auto         Transaction 0xB0A3CAD0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.30978798866)
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08E6910 opened ('flexget.plugins.metainfo.imdb_lookup', 316, 'lookup', "result = session.query(SearchResult).filter(SearchResult.title == entry['title']).first()") Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB085F990 opened ('flexget.plugins.metainfo.imdb_lookup', 316, 'lookup', "result = session.query(SearchResult).filter(SearchResult.title == entry['title']).first()") Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08E6070 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08D3F90 opened ('flexget.plugins.api_tmdb', 204, 'lookup', 'movie = movie_filter.first()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08D3D90 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08D3950 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Transaction 0xB08E63B0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.41472005844)
2016-04-27 04:09 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB08D3FD0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.15081000328)
2016-04-27 04:10 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB079F510 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.40514087677)
2016-04-27 04:10 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB0A637D0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 5.65280508995)
2016-04-27 04:10 WARNING  debug_db_sess nC_auto         Transaction 0xB21EDDD0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.17441606522)
2016-04-27 04:17 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0CD83F0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 9.96705818176)
2016-04-27 04:17 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0CD8470 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 12.360298872)
2016-04-27 04:18 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB08A0B30 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.87917804718)
2016-04-27 04:18 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB06BB610 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.67803096771)
2016-04-27 04:18 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB079F090 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 10.6119608879)
2016-04-27 04:18 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB08E6090 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 22.0379400253)
2016-04-27 04:19 WARNING  debug_db_sess nC_notify-Android Transaction 0xB0CECCB0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.94045495987)
2016-04-27 04:19 WARNING  debug_db_sess nC_notify-Android Transaction 0xB1788D10 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.85944104195)
2016-04-27 04:19 WARNING  debug_db_sess nC_notify-Android Transaction 0xB21AFA30 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 12.4280328751)
2016-04-27 04:19 WARNING  debug_db_sess nC_notify-Android Transaction 0xB0A24990 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 15.3991651535)
2016-04-27 04:19 WARNING  debug_db_sess nC_notify-Android Transaction 0xB08DFB90 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.83372020721)
2016-04-27 04:25 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0C8CF90 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 7.21403598785)
2016-04-27 04:26 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB1914250 closed ('flexget.utils.sqlalchemy_utils', 143, '__exit__', 'self.rollback()') (open time 13.5096261501)
2016-04-27 04:26 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2177, '2016-04-27 04:25:48.597339')]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 442, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/remember_rejected.py", line 97, in on_task_start
    filter(RememberEntry.expires < datetime.now()).delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3048, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2177, '2016-04-27 04:25:48.597339')]
```

I've got this this morning:

``` logtalk
...
2016-05-03 04:17 WARNING  debug_db_sess nC_auto         Transaction 0xB16EDC70 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.9200668335)
2016-05-03 04:26 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB1323A30 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.59079194069)
2016-05-03 04:27 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB182D1B0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.32148694992)
2016-05-03 04:29 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB3364450 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 6.78365898132)
2016-05-03 04:30 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB182DFF0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 15.3261499405)
2016-05-03 04:30 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB3364A50 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 9.58912181854)
2016-05-03 04:30 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB3D22F10 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 15.5697960854)
2016-05-03 04:30 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
```

And the disk was full, and it seems, that the daemon is dead...

Other 2 crashes with version 2.0.15:

``` logtalk
2016-05-10 04:09 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB163EF50 closed ('flexget.utils.sqlalchemy_utils', 143, '__exit__', 'self.rollback()') (open time 10.8980569839)
2016-05-10 04:09 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2201, '2016-05-10 04:09:31.078195')]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 442, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/remember_rejected.py", line 97, in on_task_start
    filter(RememberEntry.expires < datetime.now()).delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3048, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2201, '2016-05-10 04:09:31.078195')]
```

``` logtalk
2016-05-10 04:09 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB163EF50 closed ('flexget.utils.sqlalchemy_utils', 143, '__exit__', 'self.
rollback()') (open time 10.8980569839)
2016-05-10 04:09 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.OperationalError) database is
 locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [paramet
ers: (2201, '2016-05-10 04:09:31.078195')]
2016-05-10 04:09 CRITICAL manager       nC_notify-Progs An unexpected crash has occurred. Writing crash report to /home/osmc/.flexget/crash_repo
rt.2016.05.10.040942589168.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_c
hecker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.0.15
2016-05-10 04:09 WARNING  task          nC_notify-Progs Aborting task (plugin: remember_rejected)
2016-05-10 04:10 WARNING  debug_db_sess nC_movie-HUN    Transaction 0xB11EB9F0 closed ('flexget.utils.sqlalchemy_utils', 143, '__exit__', 'self.rollback()') (open time 37.9630770683)
2016-05-10 04:10 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task_queue.py", line 47, in run
    self.current_task.execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 70, in wrapper
    return func(self, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 583, in execute
    self._execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 515, in _execute
    last_hash = session.query(TaskConfigHash).filter(TaskConfigHash.task == self.name).first()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2634, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2457, in __getitem__
    return list(res)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT feed_config_hash.name AS feed_config_hash_name, feed_config_hash.id AS feed_config_hash_id, feed_config_hash.hash AS feed_config_hash_hash \nFROM feed_config_hash \nWHERE feed_config_hash.name = ?\n LIMIT ? OFFSET ?'] [parameters: ('nC_movie-HUN', 1, 0)]
```

Do someone know anything new about this? Thank you!

I've got a new one with version 2.0.28. I know, that the movie queue is deprecated, I'm just cleaning it up.

``` logtalk
$ flexget movie-queue del imdb_id=tt1431045
There is a FlexGet process already running for this config, sending execution there.
WARNING!: movie_queue plugin is deprecated. Please switch to using movie_list
2016-05-22 13:47 WARNING  debug_db_sess                 Sessions from 2 threads! Transaction 0xB117B930 opened ('flexget.task', 57, 'config_changed', 'task_hash.delete()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0f3aa70>: (1463917592.438065, <sqlalchemy.pool._ConnectionFairy object at 0xb0f3a210>, 'flexget.plugins.filter.series', 1618, 'on_task_start', 'session.query(SeriesTask).filter(SeriesTask.name == task.name).delete()')}
2016-05-22 13:47 WARNING  debug_db_sess                 Transaction 0xB117B930 closed ('flexget.utils.sqlalchemy_utils', 143, '__exit__', 'self.rollback()') (open time 10.5394048691)
Traceback (most recent call last):
  File "/usr/local/bin/flexget", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/flexget/__init__.py", line 42, in main
    manager.start()
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 293, in start
    client.handle_cli(self.args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 196, in __call__
    return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 71, in syncreq
    return conn.sync_request(handler, oid, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 441, in sync_request
    raise obj
rpyc.core.vinegar/sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked

========= Remote Traceback (1) =========
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 305, in _dispatch_request
    res = self._HANDLERS[handler](self, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 535, in _handle_call
    return self._local_objects[oid](*args, **dict(kwargs))
  File "/usr/local/lib/python2.7/dist-packages/flexget/ipc.py", line 80, in exposed_handle_cli
    self.manager.handle_cli(options)
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 337, in handle_cli
    options.cli_command_callback(self, command_options)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/cli/movie_queue.py", line 30, in do_cli
    manager.config_changed()
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 620, in config_changed
    config_changed()
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 34, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 57, in config_changed
    task_hash.delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3073, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM feed_config_hash']
```

is there a `config-lock` file in your dir when you run this? 

Yes, there is:

```
$ cat .flexget/.config-lock
PID: 11069
password: PWD
port: 45933
```

well try to remove the file and see if this happens again. a multitude of things can cause lock file to persist.

Is it possible in daemon mode? If I start the daemon, it will create that config-lock file. I think is not the same as the database lock..
I've removed .config-lock, and it seems to be not recreated, no error message is displayed, the daemon is running properly... what else can I check?

man, i apologize. I had the db lock file in mind with that whole comment...

Never mind! :) BTW, I've never seen that file - but I've an idea, I could monitor that file from crontab, eg. every one minute, I check if it exists - it must remain there for longer time, if it crashes Flexget!

I got one again with v2.0.42 with Python 2.7.9:

``` logtalk
2016-06-14 04:33 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB1203230 closed ('flexget.utils.sqlalchemy_ut
ils', 141, '__exit__', 'self.commit()') (open time 42.2306799889)
2016-06-14 04:33 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB3C64BB0 closed ('flexget.utils.sqlalchemy_ut
ils', 143, '__exit__', 'self.rollback()') (open time 18.7738928795)
2016-06-14 04:33 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.
OperationalError) database is locked [SQL: u'SELECT remember_rejected_feeds.id AS remember_rejected_feeds_id \nFROM
 remember_rejected_feeds \nWHERE remember_rejected_feeds.name = ?\n LIMIT ? OFFSET ?'] [parameters: ('nC_notify-Pro
gs', 1, 0)]
```

Is this still happening?

Yes, it still happening:

```
2016-10-16 04:08 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xAFEBC6F0 closed ('flexget.utils.sqlalchemy_utils', 142, '__exit__', 'self.commit()') (open time 58.0788650513)
2016-10-16 04:09 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB42E32F0 closed ('flexget.utils.sqlalchemy_utils', 142, '__exit__', 'self.commit()') (open time 19.7970759869)
2016-10-16 04:09 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 2016-10-16 04:08:46 CEST)" skipped: maximum number of running instances reached (1)
2016-10-16 04:09 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xAFCF1DF0 closed ('flexget.utils.sqlalchemy_utils', 144, '__exit__', 'self.rollback()') (open time 12.4742498398)
2016-10-16 04:09 CRITICAL task          nC_auto-HUN     BUG: Unhandled error in plugin series: (sqlite3.OperationalError) database is locked [SQL: u'SELECT series.name AS series_name, series.name_lower AS series_name_lower, series.id AS series_id, series.identified_by AS series_identified_by, series.begin_episode_id AS series_begin_episode_id \nFROM series \nWHERE series.name_lower = ?\n LIMIT ? OFFSET ?'] [parameters: (u'billions', 1, 0)]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 477, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/series.py", line 1155, in on_task_metainfo
    self.parse_series(task.entries, series_name, series_config)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/series.py", line 1246, in parse_series
    series = session.query(Series).filter(Series.name == series_name).first()  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2695, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2487, in __getitem__
    return list(res)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2795, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2818, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 945, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1393, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 462, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT series.name AS series_name, series.name_lower AS series_name_lower, series.id AS series_id, series.identified_by AS series_identified_by, series.begin_episode_id AS series_begin_episode_id \nFROM series \nWHERE series.name_lower = ?\n LIMIT ? OFFSET ?'] [parameters: (u'billions', 1, 0)]
```

Guys any plans to fix this issue? I've had this on multiple new flexget versions over the last month. Currently using flexget 2.10.110 and Python 3.6. Log attached. Cheers

[crash_report.2017.11.18.012614070941.log](https://github.com/Flexget/Flexget/files/1484734/crash_report.2017.11.18.012614070941.log)

We don't support Python 3.6
i'm seeing this when i enable trakt_lookup. i posted a few weeks ago ([in the wrong place](https://discuss.flexget.com/t/trakt-lookup-crash/3934), sorry). 

ubuntu server 14.04 / python 2.7.14 / flexGet 2.11.13 

i'm also using the IRC addon so its hard to reproduce.

UPDATE: i restarted with --debug-db-sessions and a 10min loop to count how many crash files. 7 iterations of smooth sailing ... then 32 ... 84 ... 112. i had to be excused from the dinner table to sort it :) i saved all the logs & crash files, and restarted it without trakt again. 

would this be of any help ? (or just a massive test of my sed skills that doesn't help ?) 
This is still happening, currently running python 2.7.15rc1 and flexget 2.13.18 in daemon mode, but have Python 3.6 and 3.5 and it is the same.

What help do you need @cvium? Cheers.

[crash_report.2018.05.16.055139926352.log](https://github.com/Flexget/Flexget/files/2009645/crash_report.2018.05.16.055139926352.log)
[crash_report.2018.05.16.055150261389.log](https://github.com/Flexget/Flexget/files/2009646/crash_report.2018.05.16.055150261389.log)
[crash_report.2018.05.16.055200315470.log](https://github.com/Flexget/Flexget/files/2009647/crash_report.2018.05.16.055200315470.log)



I need the minimum amount of steps required to reproduce it consistently.
@cvium well I can tell you I'm running flexget as a daemon and this happens only happens when a file is found on IRC with an IRC task and a trakt or tvdb lookup is attempted - no problem with RSS inputs.

Attached is my flexget log.

[flexget.log](https://github.com/Flexget/Flexget/files/2011535/flexget.log)
that is how im seeing this too. irc + trakt. --  this block specifically
```
trakt_lookup:
  username: zosky
  account: zosky
if:
  - trakt_watched: reject

```
it is working. ... just not writing trakt meta to the db ? it is writing ~50 crash files per hr. i turning the other cheek with cron
`    @hourly	find ~/.flexget/ -name "crash_report*" -delete`

will more logs help ? i can turn on debug 
Debug log might be helpful.
disabled the cron job and restarted daemon with debug  -- will have a look in the morning
Okay here's a debug log of a crash, I have removed various sensitive data.

```
2018-05-18 17:02 DEBUG    irc                           Result for rule var: freeleech=false
2018-05-18 17:02 DEBUG    irc                           Processing rule setregex
2018-05-18 17:02 DEBUG    irc                           Processing rule varreplace
2018-05-18 17:02 DEBUG    irc                           varreplace: irc_torrentname=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb
2018-05-18 17:02 DEBUG    irc                           Processing rule var
2018-05-18 17:02 DEBUG    irc                           Result for rule var: torrentUrl=https://www.iptorrents.com/download.php/2833001/Greys%20Anatomy%20S14E24%20All%20of%20Me%20720p%20AMZN%20WEB-DL%20DDP5%201%20H%20264-NTb.torrent?torrent_pass=
2018-05-18 17:02 DEBUG    irc                           Entry after processing: {u'irc_torrenturl': u'https://www.iptorrents.com/download.php/2833001/Greys%20Anatomy%20S14E24%20All%20of%20Me%20720p%20AMZN%20WEB-DL%20DDP5%201%20H%20264-NTb.torrent?torrent_pass=', u'original_url': u'https://www.iptorrents.com/download.php/2833001/Greys%20Anatomy%20S14E24%20All%20of%20Me%20720p%20AMZN%20WEB-DL%20DDP5%201%20H%20264-NTb.torrent?torrent_pass=', u'url': u'https://www.iptorrents.com/download.php/2833001/Greys%20Anatomy%20S14E24%20All%20of%20Me%20720p%20AMZN%20WEB-DL%20DDP5%201%20H%20264-NTb.torrent?torrent_pass=', u'irc_$baseurl': u'www.iptorrents.com', u'title': u'Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb', u'irc_torrentname': u'Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb', u'irc_freeleech': u'false', 'irc_raw_message': u'[TV/Web-DL] Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb - https://www.iptorrents.com/details.php?id=2833001 - 1.3 GB', u'irc_category': u'TV/Web-DL', u'irc_$torrentid': u'2833001', u'irc_torrentsize': u'1.3 GB'}
2018-05-18 17:02 VERBOSE  irc                           IRC message in #ipt.announce2 generated an entry: <Entry(title=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,state=undecided)>
2018-05-18 17:02 DEBUG    irc                           Entry: <Entry(title=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,state=undecided)>
2018-05-18 17:02 DEBUG    irc                           Injecting 1 entries into task "irc-tv-dl"
2018-05-18 17:02 DEBUG    manager       irc-tv-dl       Not running db cleanup, last run 2018-05-16 10:56:44
2018-05-18 17:02 DEBUG    task          irc-tv-dl       executing irc-tv-dl
2018-05-18 17:02 DEBUG    task          irc-tv-dl       Disabling input phase
2018-05-18 17:02 DEBUG    template      irc-tv-dl       Merging template global into task irc-tv-dl
2018-05-18 17:02 DEBUG    template      irc-tv-dl       Merging template tv-settings into task irc-tv-dl
2018-05-18 17:02 DEBUG    include       irc-tv-dl       Merging /home/frank/.flexget/reject.yml into task irc-tv-dl
2018-05-18 17:02 DEBUG    input_cache   irc-tv-dl       cache name: trakt_list_e216e7069b8e42547fd4d1b6cde3e0c1 (has: trakt_list_e216e7069b8e42547fd4d1b6cde3e0c1, rss_30318af0c9ab32613fc970cbfc71424c, rss_40477f06f4895eb02e8e89ff8b264d1c)
2018-05-18 17:02 VERBOSE  input_cache   irc-tv-dl       Restored 54 entries from cache
2018-05-18 17:02 DEBUG    parser_internal irc-tv-dl       Parsing series: `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb` kwargs: {'name': None}
2018-05-18 17:02 DEBUG    parser_internal irc-tv-dl       Parsing result: <SeriesParser(data=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,name=Greys Anatomy,id=(14, 24),season=14,season_pack=None,episode=24,quality=720p webdl h264 dd+5.1,proper=0,status=OK)> (in 0.968000000057 ms)
2018-05-18 17:02 DEBUG    parser_internal irc-tv-dl       Parsing series: `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb` kwargs: {'identified_by': u'ep', u'date_regexps': [], 'strict_name': False, 'name': u"Grey's Anatomy (2005)", 'prefer_specials': None, 'special_ids': [], 'alternate_names': [], u'sequence_regexps': [], 'date_dayfirst': None, u'id_regexps': [], 'assume_special': None, 'name_regexps': [], 'date_yearfirst': None, 'allow_groups': [], u'ep_regexps': []}
2018-05-18 17:02 DEBUG    parser_internal irc-tv-dl       Parsing result: <SeriesParser(data=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,name=Grey's Anatomy (2005),id=(14, 24),season=14,season_pack=None,episode=24,quality=720p webdl h264 dd+5.1,proper=0,status=OK)> (in 0.95900000008 ms)
2018-05-18 17:02 DEBUG    series        irc-tv-dl       `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb` detected as `<SeriesParseResult(data=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,name=Grey's Anatomy (2005),id=(14, 24),season=14,season_pack=None,episode=24,quality=720p webdl h264 dd+5.1,proper=0,special=False,status=OK)>`, field: `title`
2018-05-18 17:02 DEBUG    series        irc-tv-dl       series on_task_metainfo took 0.01156 to parse
2018-05-18 17:02 DEBUG    series        irc-tv-dl       adding release `<SeriesParseResult(data=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,name=Grey's Anatomy (2005),id=(14, 24),season=14,season_pack=None,episode=24,quality=720p webdl h264 dd+5.1,proper=0,special=False,status=OK)>`
2018-05-18 17:02 DEBUG    series        irc-tv-dl       -> added `<Release(id=None,quality=720p webdl h264 dd+5.1,downloaded=None,proper_count=0,title=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb)>`
2018-05-18 17:02 DEBUG    series        irc-tv-dl       start with entities: [u'Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb']
2018-05-18 17:02 DEBUG    series        irc-tv-dl       current entities: [u'Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb']
2018-05-18 17:02 DEBUG    series        irc-tv-dl       quality req: 720p-1080p webrip+
2018-05-18 17:02 DEBUG    series        irc-tv-dl       -------------------- process_propers -->
2018-05-18 17:02 DEBUG    series        irc-tv-dl       propers - downloaded qualities: {}
2018-05-18 17:02 DEBUG    series        irc-tv-dl       continuing w. entities: [u'Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb']
2018-05-18 17:02 DEBUG    series        irc-tv-dl       best entity is: `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb`
2018-05-18 17:02 DEBUG    series        irc-tv-dl       -------------------- tracking -->
2018-05-18 17:02 DEBUG    series        irc-tv-dl       latest episode for series <Series(id=194,name=Grey's Anatomy (2005))>, with downloaded set to True and season set to None
2018-05-18 17:02 DEBUG    series        irc-tv-dl       no season packs found for series `Grey's Anatomy (2005)` with parameters season: None, downloaded: True
2018-05-18 17:02 DEBUG    series        irc-tv-dl       latest download: <Episode(id=4092,identifier=S14E23,season=14,number=23)>
2018-05-18 17:02 DEBUG    series        irc-tv-dl       current: <Episode(id=4199,identifier=S14E24,season=14,number=24)>
2018-05-18 17:02 DEBUG    series        irc-tv-dl       timeframe: 18 hours
2018-05-18 17:02 DEBUG    series        irc-tv-dl       timeframe: 18:00:00, first_seen: 2018-05-18 00:14:35.148305, expires: 2018-05-18 18:14:35.148305
2018-05-18 17:02 INFO     series        irc-tv-dl       `Grey's Anatomy (2005)`: timeframe waiting for 01h:11min. Currently best is `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb`.
2018-05-18 17:02 WARNING  backlog       irc-tv-dl       No input snapshot available for `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb`, using current state
2018-05-18 17:02 DEBUG    backlog       irc-tv-dl       Saving Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb
2018-05-18 17:02 DEBUG    api_trakt     irc-tv-dl       Episode 14 24 not found in cache, looking up from trakt.
2018-05-18 17:02 DEBUG    utils.requests irc-tv-dl       Fetching URL https://api.trakt.tv/shows/1407/seasons/14/episodes/24/?extended=full with args () and kwargs {'allow_redirects': True, u'timeout': 30}
2018-05-18 17:03 DEBUG    irc_bot                       Executing scheduled command keepalive
2018-05-18 17:03 DEBUG    irc_bot                       SENT: PING irc.iptorrents.com
2018-05-18 17:03 DEBUG    irc_bot                       Queueing command "keepalive" to execute in 120 second(s)
2018-05-18 17:03 DEBUG    irc_bot                       Received: [command: PONG, prefix: irc.iptorrents.com, tags: None, arguments: [irc.iptorrents.com, irc.iptorrents.com], from_nick: None, raw: :irc.iptorrents.com PONG irc.iptorrents.com :irc.iptorrents.com]
2018-05-18 17:03 ERROR    lazy_lookup   irc-tv-dl       Unhandled error in lazy lookup plugin
Traceback (most recent call last):
  File "/home/frank/flexget/local/lib/python2.7/site-packages/flexget/utils/lazy_dict.py", line 37, in __getitem__
    func(self.store)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/flexget/plugins/metainfo/trakt_lookup.py", line 240, in lazy_episode_lookup
    entry.update_using_map(self.episode_map, episode)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/flexget/utils/sqlalchemy_utils.py", line 144, in __exit__
    self.commit()
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 943, in commit
    self.transaction.commit()
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 467, in commit
    self._prepare_impl()
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 447, in _prepare_impl
    self.session.flush()
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2254, in flush
    self._flush(objects)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2380, in _flush
    transaction.rollback(_capture_exception=True)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2344, in _flush
    flush_context.execute()
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 391, in execute
    rec.execute(self)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 556, in execute
    uow
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 181, in save_obj
    mapper, table, insert)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 830, in _emit_insert_statements
    execute(statement, multiparams)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 507, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_episodes (id, tvdb_id, imdb_id, tmdb_id, tvrage_id, title, season, number, number_abs, overview, first_aired, updated_at, cached_at, series_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: (2945582, 6628121, None, 1481988, 0, u'All of Me', 14, 24, None, u'Meredith Grey and the team of doctors at Grey Sloan Memorial are faced with life-or-death decisions on a daily basis. They seek comfort from one another, and, at times, more than just friendship. Together they discover that neither medicine nor relationships can be defined in black and white.', '2018-05-18 00:00:00.000000', '2018-05-18 20:59:54.000000', '2018-05-18 17:02:52.062493', 1407)] (Background on this error at: http://sqlalche.me/e/e3q8)

```
And here's another from hours earlier for the same episode (different file and different IRC network).
[crash_report.2018.05.18.055340814688.log](https://github.com/Flexget/Flexget/files/2018705/crash_report.2018.05.18.055340814688.log)

Ok guys, this defect is 2 years old now, anything else we can do to help diagnose this?
@frankyw You can try installing from the git branch `refactor_trakt_api` and see if it helps
@cvium ok here's the new error.


 14:42 DEBUG    parser_internal irc-tv-dl       Parsing series: `Empire.2015.S04E18.720p.HDTV.x264-CRAVERS` kwargs: {'name': None}
2018-05-25 14:42 DEBUG    parser_internal irc-tv-dl       Parsing result: <SeriesParser(data=Empire.2015.S04E18.720p.HDTV.x264-CRAVERS,name=Empire 2015,id=(4, 18),season=4,season_pack=None,episode=18,quality=720p hdtv h264,proper=0,status=OK)> (in 0.467999999984 ms)
2018-05-25 14:42 DEBUG    parser_internal irc-tv-dl       Parsing series: `Empire.2015.S04E18.720p.HDTV.x264-CRAVERS` kwargs: {'identified_by': u'ep', u'date_regexps': [], 'strict_name': False, 'name': u'Empire (2015)', 'prefer_specials': None, 'special_ids': [], 'alternate_names': [], u'sequence_regexps': [], 'date_dayfirst': None, u'id_regexps': [], 'assume_special': None, 'name_regexps': [], 'date_yearfirst': None, 'allow_groups': [], u'ep_regexps': []}
2018-05-25 14:42 DEBUG    parser_internal irc-tv-dl       Parsing result: <SeriesParser(data=Empire.2015.S04E18.720p.HDTV.x264-CRAVERS,name=Empire (2015),id=(4, 18),season=4,season_pack=None,episode=18,quality=720p hdtv h264,proper=0,status=OK)> (in 0.325000000004 ms)
2018-05-25 14:42 DEBUG    series        irc-tv-dl       `Empire.2015.S04E18.720p.HDTV.x264-CRAVERS` detected as `<SeriesParseResult(data=Empire.2015.S04E18.720p.HDTV.x264-CRAVERS,name=Empire (2015),id=(4, 18),season=4,season_pack=None,episode=18,quality=720p hdtv h264,proper=0,special=False,status=OK)>`, field: `title`
2018-05-25 14:42 DEBUG    series        irc-tv-dl       series on_task_metainfo took 0.010585 to parse
2018-05-25 14:42 CRITICAL task          irc-tv-dl       BUG: Unhandled error in plugin series: expected string or buffer
Traceback (most recent call last):
  File "/home/frank/flexget-dev/flexget/task.py", line 486, in __run_plugin
    return method(*args, **kwargs)
  File "/home/frank/flexget-dev/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/home/frank/flexget-dev/flexget/plugins/filter/series.py", line 1710, in on_task_filter
    quality=entry.get('quality'))
  File "/home/frank/flexget-dev/flexget/plugins/filter/series.py", line 985, in store_parser
    filter(table.quality == quality). \
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/ext/hybrid.py", line 867, in __get__
    return self._expr_comparator(owner)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/ext/hybrid.py", line 1066, in expr_comparator
    owner, self.__name__, self, comparator(owner),
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/ext/hybrid.py", line 1055, in _expr
    return ExprComparator(cls, expr(cls), self)
  File "/home/frank/flexget-dev/flexget/utils/database.py", line 182, in getter
    return qualities.Quality(getattr(self, text_attr))
  File "/home/frank/flexget-dev/flexget/utils/qualities.py", line 211, in __init__
    self.parse(text)
  File "/home/frank/flexget-dev/flexget/utils/qualities.py", line 225, in parse
    self.resolution = self._find_best(_resolutions, _UNKNOWNS['resolution'], False)
  File "/home/frank/flexget-dev/flexget/utils/qualities.py", line 241, in _find_best
    match = item.matches(search_in)
  File "/home/frank/flexget-dev/flexget/utils/qualities.py", line 45, in matches
    match = self.regexp.search(text)
TypeError: expected string or buffer
@frankyw that's a bug that was fixed fairly recently. I've pulled the latest changes from develop into the branch. Update from the branch and try again.
@cvium Ok I've done as you suggested and it doesn't seem to be good news I'm afraid, I am still seeing quite a lot of crashes, all to do with database locking with trakt. Here is one such log. Please let me know if I can try anything else. Cheers.

```
2018-05-27 22:36 DEBUG    irc                           Processing rule varreplace
2018-05-27 22:36 DEBUG    irc                           varreplace: irc_torrentname=Deception 2018 S01E13 AAC MP4-Mobile
2018-05-27 22:36 DEBUG    irc                           Processing rule var
2018-05-27 22:36 DEBUG    irc                           Result for rule var: torrentUrl=https://www.iptorrents.com/download.php/2845951/Deception%202018%20S01E13%20AAC%20MP4-Mobile.torrent?torrent_pass=
2018-05-27 22:36 DEBUG    irc                           Entry after processing: {u'irc_torrenturl': u'https://www.iptorrents.com/download.php/2845951/Deception%202018%20S01E13%20AAC%20MP4-Mobile.torrent?torrent_pass=', u'original_url': u'https://www.iptorrents.com/download.php/2845951/Deception%202018%20S01E13%20AAC%20MP4-Mobile.torrent?torrent_pass=', u'url': u'https://www.iptorrents.com/download.php/2845951/Deception%202018%20S01E13%20AAC%20MP4-Mobile.torrent?torrent_pass=', u'irc_$baseurl': u'www.iptorrents.com', u'title': u'Deception 2018 S01E13 AAC MP4-Mobile', u'irc_torrentname': u'Deception 2018 S01E13 AAC MP4-Mobile', u'irc_freeleech': u'false', 'irc_raw_message': u'[TV/Mobile] Deception 2018 S01E13 AAC MP4-Mobile - https://www.iptorrents.com/details.php?id=2845951 - 185.3 MB', u'irc_category': u'TV/Mobile', u'irc_$torrentid': u'2845951', u'irc_torrentsize': u'185.3 MB'}
2018-05-27 22:36 VERBOSE  irc                           IRC message in #ipt.announce2 generated an entry: <Entry(title=Deception 2018 S01E13 AAC MP4-Mobile,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Entry: <Entry(title=Deception 2018 S01E13 AAC MP4-Mobile,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Entry "Deception 2018 S01E13 AAC MP4-Mobile" did not match any task regexp.
2018-05-27 22:36 DEBUG    irc_bot                       Received: [command: PRIVMSG, prefix: FunTimes!FunTimes@netadmin.iptorrents.com, tags: None, arguments: [#ipt.announce2, [TV/x265] UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta - https://www.iptorrents.com/details.php?id=2845952 - 2.7 GB], from_nick: FunTimes, raw: :FunTimes!FunTimes@netadmin.iptorrents.com PRIVMSG #ipt.announce2 :[TV/x265] UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta - https://www.iptorrents.com/details.php?id=2845952 - 2.7 GB]
2018-05-27 22:36 DEBUG    irc_bot                       Queueing command "process_message" to execute in 1 second(s)
2018-05-27 22:36 DEBUG    irc_bot                       Received: [command: PRIVMSG, prefix: FunTimes!FunTimes@netadmin.iptorrents.com, tags: None, arguments: [#ipt.announce2, [TV/x264] Killing Eve S01E08 CONVERT 720p WEB h264-TBS - https://www.iptorrents.com/details.php?id=2845953 - 749.7 MB], from_nick: FunTimes, raw: :FunTimes!FunTimes@netadmin.iptorrents.com PRIVMSG #ipt.announce2 :[TV/x264] Killing Eve S01E08 CONVERT 720p WEB h264-TBS - https://www.iptorrents.com/details.php?id=2845953 - 749.7 MB]
2018-05-27 22:36 DEBUG    irc_bot                       Executing scheduled command process_message
2018-05-27 22:36 DEBUG    irc                           Received line(s): [TV/x265] UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta - https://www.iptorrents.com/details.php?id=2845952 - 2.7 GB
[TV/x264] Killing Eve S01E08 CONVERT 720p WEB h264-TBS - https://www.iptorrents.com/details.php?id=2845953 - 749.7 MB
2018-05-27 22:36 DEBUG    irc                           Using pattern ^\[([^\]]*)](.*)-\s+https?\:\/\/([^\/]+).*[&\?]id=(\d+)\s*-(.*) to parse message vars
2018-05-27 22:36 DEBUG    irc                           Found: {u'irc_$torrentid': u'2845952', u'irc_$baseurl': u'www.iptorrents.com', u'irc_torrentsize': u'2.7 GB', u'irc_torrentname': u'UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta', u'irc_category': u'TV/x265'}
2018-05-27 22:36 DEBUG    irc                           Using pattern ^\[([^\]]*)](.*)-\s+https?\:\/\/([^\/]+).*[&\?]id=(\d+)\s*-(.*) to parse message vars
2018-05-27 22:36 DEBUG    irc                           Found: {u'irc_$torrentid': u'2845953', u'irc_$baseurl': u'www.iptorrents.com', u'irc_torrentsize': u'749.7 MB', u'irc_torrentname': u'Killing Eve S01E08 CONVERT 720p WEB h264-TBS', u'irc_category': u'TV/x264'}
2018-05-27 22:36 DEBUG    irc                           Processing rule var
2018-05-27 22:36 DEBUG    irc                           Result for rule var: freeleech=false
2018-05-27 22:36 DEBUG    irc                           Processing rule setregex
2018-05-27 22:36 DEBUG    irc                           Processing rule varreplace
2018-05-27 22:36 DEBUG    irc                           varreplace: irc_torrentname=UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta
2018-05-27 22:36 DEBUG    irc                           Processing rule var
2018-05-27 22:36 DEBUG    irc                           Result for rule var: torrentUrl=https://www.iptorrents.com/download.php/2845952/UFC%20Fight%20Night%20130%20Prelims%20720p%20HEVC%20x265-MeGusta.torrent?torrent_pass=
2018-05-27 22:36 DEBUG    irc                           Entry after processing: {u'irc_torrenturl': u'https://www.iptorrents.com/download.php/2845952/UFC%20Fight%20Night%20130%20Prelims%20720p%20HEVC%20x265-MeGusta.torrent?torrent_pass=', u'original_url': u'https://www.iptorrents.com/download.php/2845952/UFC%20Fight%20Night%20130%20Prelims%20720p%20HEVC%20x265-MeGusta.torrent?torrent_pass=', u'url': u'https://www.iptorrents.com/download.php/2845952/UFC%20Fight%20Night%20130%20Prelims%20720p%20HEVC%20x265-MeGusta.torrent?torrent_pass=', u'irc_$baseurl': u'www.iptorrents.com', u'title': u'UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta', u'irc_torrentname': u'UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta', u'irc_freeleech': u'false', 'irc_raw_message': u'[TV/x265] UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta - https://www.iptorrents.com/details.php?id=2845952 - 2.7 GB', u'irc_category': u'TV/x265', u'irc_$torrentid': u'2845952', u'irc_torrentsize': u'2.7 GB'}
2018-05-27 22:36 VERBOSE  irc                           IRC message in #ipt.announce2 generated an entry: <Entry(title=UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Entry: <Entry(title=UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Injecting 1 entries into task "irc-tv-dl"
2018-05-27 22:36 DEBUG    irc                           Processing rule var
2018-05-27 22:36 DEBUG    irc                           Result for rule var: freeleech=false
2018-05-27 22:36 DEBUG    irc                           Processing rule setregex
2018-05-27 22:36 DEBUG    irc                           Processing rule varreplace
2018-05-27 22:36 DEBUG    irc                           varreplace: irc_torrentname=Killing Eve S01E08 CONVERT 720p WEB h264-TBS
2018-05-27 22:36 DEBUG    irc                           Processing rule var
2018-05-27 22:36 DEBUG    irc                           Result for rule var: torrentUrl=https://www.iptorrents.com/download.php/2845953/Killing%20Eve%20S01E08%20CONVERT%20720p%20WEB%20h264-TBS.torrent?torrent_pass=
2018-05-27 22:36 DEBUG    irc                           Entry after processing: {u'irc_torrenturl': u'https://www.iptorrents.com/download.php/2845953/Killing%20Eve%20S01E08%20CONVERT%20720p%20WEB%20h264-TBS.torrent?torrent_pass=', u'original_url': u'https://www.iptorrents.com/download.php/2845953/Killing%20Eve%20S01E08%20CONVERT%20720p%20WEB%20h264-TBS.torrent?torrent_pass=', u'url': u'https://www.iptorrents.com/download.php/2845953/Killing%20Eve%20S01E08%20CONVERT%20720p%20WEB%20h264-TBS.torrent?torrent_pass=', u'irc_$baseurl': u'www.iptorrents.com', u'title': u'Killing Eve S01E08 CONVERT 720p WEB h264-TBS', u'irc_torrentname': u'Killing Eve S01E08 CONVERT 720p WEB h264-TBS', u'irc_freeleech': u'false', 'irc_raw_message': u'[TV/x264] Killing Eve S01E08 CONVERT 720p WEB h264-TBS - https://www.iptorrents.com/details.php?id=2845953 - 749.7 MB', u'irc_category': u'TV/x264', u'irc_$torrentid': u'2845953', u'irc_torrentsize': u'749.7 MB'}
2018-05-27 22:36 VERBOSE  irc                           IRC message in #ipt.announce2 generated an entry: <Entry(title=Killing Eve S01E08 CONVERT 720p WEB h264-TBS,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Entry: <Entry(title=Killing Eve S01E08 CONVERT 720p WEB h264-TBS,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Injecting 1 entries into task "irc-tv-dl"
2018-05-27 22:36 ERROR    lazy_lookup   irc-tv-dl       Unhandled error in lazy lookup plugin: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_episodes (id, tvdb_id, imdb_id, tmdb_id, tvrage_id, title, season, number, number_abs, overview, first_aired, updated_at, cached_at, series_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: (2919716, 6670455, u'tt7081320', 1480383, 0, u"God, I'm Tired", 1, 8, None, u"Villanelle's mission is proving anything but straightforward, forcing her to take drastic measures. Meanwhile, Eve makes a shocking discovery, which leads her right to Villanelle and an electrifying confrontation from which neither will emerge unscathed.", '2018-05-28 00:00:00.000000', '2018-05-28 01:17:13.000000', '2018-05-27 22:36:39.202462', 126924)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-05-27 22:36 CRITICAL manager       irc-tv-dl       An unexpected crash has occurred. Writing crash report to /home/frank/.flexget/crash_report.2018.05.27.223649233412.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.21.dev
2018-05-27 22:36 DEBUG    manager       irc-tv-dl       Traceback:
Traceback (most recent call last):
  File "/home/frank/flexget-dev/flexget/utils/lazy_dict.py", line 37, in __getitem__
    func(self.store)
  File "/home/frank/flexget-dev/flexget/plugins/metainfo/trakt_lookup.py", line 32, in __call__
    result = self.lookup_function(entry, session)
  File "/home/frank/flexget-dev/flexget/plugins/metainfo/trakt_lookup.py", line 288, in _get_episode
    return show.get_episode(entry['series_season'], entry['series_episode'], session)
  File "/home/frank/flexget-dev/flexget/plugins/internal/api_trakt.py", line 646, in get_episode
    session.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 943, in commit
    self.transaction.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 467, in commit
    self._prepare_impl()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 447, in _prepare_impl
    self.session.flush()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2254, in flush
    self._flush(objects)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2380, in _flush
    transaction.rollback(_capture_exception=True)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2344, in _flush
    flush_context.execute()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 391, in execute
    rec.execute(self)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 556, in execute
    uow
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 181, in save_obj
    mapper, table, insert)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 830, in _emit_insert_statements
    execute(statement, multiparams)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 507, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_episodes (id, tvdb_id, imdb_id, tmdb_id, tvrage_id, title, season, number, number_abs, overview, first_aired, updated_at, cached_at, series_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: (2919716, 6670455, u'tt7081320', 1480383, 0, u"God, I'm Tired", 1, 8, None, u"Villanelle's mission is proving anything but straightforward, forcing her to take drastic measures. Meanwhile, Eve makes a shocking discovery, which leads her right to Villanelle and an electrifying confrontation from which neither will emerge unscathed.", '2018-05-28 00:00:00.000000', '2018-05-28 01:17:13.000000', '2018-05-27 22:36:39.202462', 126924)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-05-27 22:36 DEBUG    utils.requests irc-tv-dl       GETing URL https://api.trakt.tv/shows/126924/people with args () and kwargs {'allow_redirects': True, 'params': {u'extended': u'full'}, u'timeout': 30}
2018-05-27 22:36 ERROR    lazy_lookup   irc-tv-dl       Unhandled error in lazy lookup plugin: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_actors (id, name, slug, tmdb, imdb, biography, birthday, death, homepage) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: ((1121041, u'Sean Delaney', u'sean-delaney', 2021417, None, u'', None, None, None), (473194, u'Jodie Comer', u'jodie-comer', 1388593, u'nm3069650', u'Jodie Comer is a British actress who rose to prominence in 2011 when she played the role of Sharna in BBC One drama Justice. She also played Chloe in BAFTA-nominated British comedy-drama series My Mad Fat Diary (2013-2014).', None, None, None), (414091, u'Fiona Shaw', u'fiona-shaw', 10981, u'nm0789716', u'From Wikipedia, the free encyclopedia.\n\nFiona Shaw, Honorary CBE (born 10 July 1958) is an Irish actress and theatre director. Although to interna ... (171 characters truncated) ... an honorary CBE in 2001.\n\nDescription above from the Wikipedia article Fiona Shaw, licensed under CC-BY-SA, full list of contributors on Wikipedia.', '1958-07-10', None, None), (9838, u'Darren Boyd', u'darren-boyd', 17123, u'nm0101740', u'', '1971-01-30', None, None), (653745, u'Kirby Howell-Baptiste', u'kirby-howell-baptiste', 1532312, u'nm4624730', u'', None, None, None), (417747, u'Sandra Oh', u'sandra-oh', 25540, u'nm0644897', u"From Wikipedia, the free encyclopedia.\n\nSandra Oh (born July 20, 1971) is a Canadian actress. She is primarily known for portraying the role of Dr ... (106 characters truncated) ... d. She also played notable roles in the feature films Under the Tuscan Sun and Sideways, and had a supporting role on the HBO original series Arli$$.", '1971-07-20', None, u'http://www.sandraoh.com/'), (412122, u'Kim Bodnia', u'kim-bodnia', 3398, u'nm0091035', u"\u200bKim Bodnia (f\xf8dt 12. april 1965) er en dansk skuespiller. Han har medvirket i flere af de danske filmsuccesser fra 1990'erne bl.a. Nattevag ... (180 characters truncated) ... ar med skuespilleren Lotte Merete Andersen, som han ogs\xe5 har en s\xf8n med og er nu gift med Rikke Louise Andersson som han tre b\xf8rn med.  \xa0", '1965-04-12', None, None), (186620, u'Owen McDonnell', u'owen-mcdonnell', 365333, u'nm1711652', u'', None, None, None))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-05-27 22:36 CRITICAL manager       irc-tv-dl       An unexpected crash has occurred. Writing crash report to /home/frank/.flexget/crash_report.2018.05.27.223659517782.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.21.dev
2018-05-27 22:36 DEBUG    manager       irc-tv-dl       Traceback:
Traceback (most recent call last):
  File "/home/frank/flexget-dev/flexget/utils/lazy_dict.py", line 37, in __getitem__
    func(self.store)
  File "/home/frank/flexget-dev/flexget/plugins/metainfo/trakt_lookup.py", line 36, in __call__
    entry.update_using_map(self.field_map, result)
  File "/home/frank/flexget-dev/flexget/utils/sqlalchemy_utils.py", line 144, in __exit__
    self.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 943, in commit
    self.transaction.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 467, in commit
    self._prepare_impl()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 447, in _prepare_impl
    self.session.flush()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2254, in flush
    self._flush(objects)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2380, in _flush
    transaction.rollback(_capture_exception=True)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2344, in _flush
    flush_context.execute()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 391, in execute
    rec.execute(self)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 556, in execute
    uow
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 181, in save_obj
    mapper, table, insert)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 830, in _emit_insert_statements
    execute(statement, multiparams)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1170, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 504, in do_executemany
    cursor.executemany(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_actors (id, name, slug, tmdb, imdb, biography, birthday, death, homepage) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: ((1121041, u'Sean Delaney', u'sean-delaney', 2021417, None, u'', None, None, None), (473194, u'Jodie Comer', u'jodie-comer', 1388593, u'nm3069650', u'Jodie Comer is a British actress who rose to prominence in 2011 when she played the role of Sharna in BBC One drama Justice. She also played Chloe in BAFTA-nominated British comedy-drama series My Mad Fat Diary (2013-2014).', None, None, None), (414091, u'Fiona Shaw', u'fiona-shaw', 10981, u'nm0789716', u'From Wikipedia, the free encyclopedia.\n\nFiona Shaw, Honorary CBE (born 10 July 1958) is an Irish actress and theatre director. Although to interna ... (171 characters truncated) ... an honorary CBE in 2001.\n\nDescription above from the Wikipedia article Fiona Shaw, licensed under CC-BY-SA, full list of contributors on Wikipedia.', '1958-07-10', None, None), (9838, u'Darren Boyd', u'darren-boyd', 17123, u'nm0101740', u'', '1971-01-30', None, None), (653745, u'Kirby Howell-Baptiste', u'kirby-howell-baptiste', 1532312, u'nm4624730', u'', None, None, None), (417747, u'Sandra Oh', u'sandra-oh', 25540, u'nm0644897', u"From Wikipedia, the free encyclopedia.\n\nSandra Oh (born July 20, 1971) is a Canadian actress. She is primarily known for portraying the role of Dr ... (106 characters truncated) ... d. She also played notable roles in the feature films Under the Tuscan Sun and Sideways, and had a supporting role on the HBO original series Arli$$.", '1971-07-20', None, u'http://www.sandraoh.com/'), (412122, u'Kim Bodnia', u'kim-bodnia', 3398, u'nm0091035', u"\u200bKim Bodnia (f\xf8dt 12. april 1965) er en dansk skuespiller. Han har medvirket i flere af de danske filmsuccesser fra 1990'erne bl.a. Nattevag ... (180 characters truncated) ... ar med skuespilleren Lotte Merete Andersen, som han ogs\xe5 har en s\xf8n med og er nu gift med Rikke Louise Andersson som han tre b\xf8rn med.  \xa0", '1965-04-12', None, None), (186620, u'Owen McDonnell', u'owen-mcdonnell', 365333, u'nm1711652', u'', None, None, None))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-05-27 22:36 DEBUG    utils.requests irc-tv-dl       GETing URL https://api.trakt.tv/shows/126924/translations with args () and kwargs {'allow_redirects': True, 'params': {u'extended': u'full'}, u'timeout': 30}
2018-05-27 22:37 DEBUG    irc_bot                       Received: [command: PING, prefix: None, tags: None, arguments: [irc.iptorrents.com], from_nick: None, raw: PING :irc.iptorrents.com]
2018-05-27 22:37 DEBUG    irc_bot                       SENT: PONG :irc.iptorrents.com
2018-05-27 22:37 ERROR    lazy_lookup   irc-tv-dl       Unhandled error in lazy lookup plugin: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_show_translations (language, overview, title, show_id) VALUES (?, ?, ?, ?)'] [parameters: (u'bg', u'\u0418\u0439\u0432 \u0435 \u043e\u0442\u0435\u0433\u0447\u0435\u043d\u0430 \u0438 \u0431\u0440\u0438\u043b\u044f\u043d\u0442\u043d\u0430 \u0441\u043 ... (3923 characters truncated) ... u0430\u043b\u043d\u043e\u0441\u0442, \u0432\u0438\u0441\u043e\u043a\u0438 \u0437\u0430\u043b\u043e\u0437\u0438 \u0438 \u0435\u043a\u0448\u044a\u043d.', u'\u0423\u0431\u0438\u0432\u0430\u0439\u043a\u0438 \u0418\u0439\u0432', 126924)] (Background on this error at: http://sqlalche.me/e/e3q8)
Traceback (most recent call last):
  File "/home/frank/flexget-dev/flexget/utils/lazy_dict.py", line 37, in __getitem__
    func(self.store)
  File "/home/frank/flexget-dev/flexget/plugins/metainfo/trakt_lookup.py", line 36, in __call__
    entry.update_using_map(self.field_map, result)
  File "/home/frank/flexget-dev/flexget/utils/sqlalchemy_utils.py", line 144, in __exit__
    self.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 943, in commit
    self.transaction.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 467, in commit
    self._prepare_impl()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 447, in _prepare_impl
    self.session.flush()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2254, in flush
    self._flush(objects)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2380, in _flush
    transaction.rollback(_capture_exception=True)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2344, in _flush
    flush_context.execute()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 391, in execute
    rec.execute(self)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 556, in execute
    uow
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 181, in save_obj
    mapper, table, insert)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 866, in _emit_insert_statements
    execute(statement, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 507, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_show_translations (language, overview, title, show_id) VALUES (?, ?, ?, ?)'] [parameters: (u'bg', u'\u0418\u0439\u0432 \u0435 \u043e\u0442\u0435\u0433\u0447\u0435\u043d\u0430 \u0438 \u0431\u0440\u0438\u043b\u044f\u043d\u0442\u043d\u0430 \u0441\u043 ... (3923 characters truncated) ... u0430\u043b\u043d\u043e\u0441\u0442, \u0432\u0438\u0441\u043e\u043a\u0438 \u0437\u0430\u043b\u043e\u0437\u0438 \u0438 \u0435\u043a\u0448\u044a\u043d.', u'\u0423\u0431\u0438\u0432\u0430\u0439\u043a\u0438 \u0418\u0439\u0432', 126924)] (Background on this error at: http://sqlalche.me/e/e3q8)

```
So the crashes are worse now?
@cvium well I guess worse in the sense there now seem to be multiple 'database locked' errors occurring together, but the frequency of crash files seems to be around the same.
I still can't reproduce it. If someone can send me their .sqlite db I can take a look.
@cvium I can send you my sqlite db, what's the best way to contact you?
Interestingly, I also have this same configuration running on a completely different server that I run for a friend of mind, his also crashes in a similar (database locked) yet different way:

2018-06-03 12:26 CRITICAL task          monitor-rss     BUG: Unhandled error in plugin configure_series: (sqlite3.OperationalError) database is locked [SQL: u'SELECT input_cache.id AS input_cache_id, input_cache.name AS input_cache_name, input_cache.hash AS input_cache_hash, input_cache.added AS input_cache_added \nFROM input_cache \nWHERE input_cache.name = ? AND input_cache.hash = ? AND input_cache.added > ?\n LIMIT ? OFFSET ?'] [parameters: ('trakt_list', '3df51d701f7fcc73456449b7fe0b6d7f', '2018-06-03 10:26:22.021600', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:26 CRITICAL manager       monitor-rss     An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.122632079654.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:26 WARNING  task          monitor-rss     Aborting task (plugin: configure_series)
2018-06-03 12:26 CRITICAL task          monitor-rss     BUG: Unhandled error in plugin status: (sqlite3.OperationalError) database is locked [SQL: u'SELECT status_task.task AS status_task_task, status_task.id AS status_task_id \nFROM status_task \nWHERE status_task.id = ?'] [parameters: (6,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:26 CRITICAL manager       monitor-rss     An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.122642124837.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:26 WARNING  task          monitor-rss     Aborting task (plugin: status)
2018-06-03 12:26 ERROR    task          monitor-rss     abort handlers aborted: 
Traceback (most recent call last):
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 617, in _execute
    self.__run_task_phase('abort')
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 453, in __run_task_phase
    response = self.__run_plugin(plugin, phase, args)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 519, in __run_plugin
    self.abort(msg, traceback=traceback)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 370, in abort
    raise TaskAbort(reason, silent=silent)
TaskAbort
2018-06-03 12:28 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 12:28 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.122832619954.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:52 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528026747.709294,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:52 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528026767.825509,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:53 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528026787.857487,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:53 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528026807.89541,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:54 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 12:54 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.125400329226.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:54 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 12:54 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.125410392435.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:54 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 12:54 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.125420436244.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:54 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 12:54 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.125430674224.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 13:21 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528028488.301318,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:21 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528028508.622292,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:22 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528028528.663983,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:22 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528028548.697486,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:23 CRITICAL task          irc-tv-dl       BUG: Unhandled error in plugin configure_series: (sqlite3.OperationalError) database is locked [SQL: u'SELECT input_cache.id AS input_cache_id, input_cache.name AS input_cache_name, input_cache.hash AS input_cache_hash, input_cache.added AS input_cache_added \nFROM input_cache \nWHERE input_cache.name = ? AND input_cache.hash = ? AND input_cache.added > ?\n LIMIT ? OFFSET ?'] [parameters: ('trakt_list', '3df51d701f7fcc73456449b7fe0b6d7f', '2018-06-03 11:22:50.081105', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:23 CRITICAL manager       irc-tv-dl       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.132300140831.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 13:23 WARNING  task          irc-tv-dl       Aborting task (plugin: configure_series)
2018-06-03 13:23 WARNING  backlog       irc-tv-dl       No input snapshot available for `Ransom S02E08 1080p HEVC x265-MeGusta`, using current state
2018-06-03 13:23 CRITICAL task          irc-tv-dl       BUG: Unhandled error in plugin backlog: (sqlite3.OperationalError) database is locked [SQL: u'SELECT backlog.feed AS backlog_feed, backlog.json AS backlog_json, backlog.id AS backlog_id, backlog.title AS backlog_title, backlog.expire AS backlog_expire \nFROM backlog \nWHERE backlog.title = ? AND backlog.feed = ?\n LIMIT ? OFFSET ?'] [parameters: (u'Ransom S02E08 1080p HEVC x265-MeGusta', 'irc-tv-dl', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:23 CRITICAL manager       irc-tv-dl       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.132310186695.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 13:23 WARNING  task          irc-tv-dl       Aborting task (plugin: backlog)
2018-06-03 13:23 ERROR    task          irc-tv-dl       abort handlers aborted: 
Traceback (most recent call last):
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 617, in _execute
    self.__run_task_phase('abort')
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 453, in __run_task_phase
    response = self.__run_plugin(plugin, phase, args)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 519, in __run_plugin
    self.abort(msg, traceback=traceback)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 370, in abort
    raise TaskAbort(reason, silent=silent)
TaskAbort
2018-06-03 13:23 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 13:23 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.132320380239.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 13:23 CRITICAL task          monitor-rss     BUG: Unhandled error in plugin configure_series: (sqlite3.OperationalError) database is locked [SQL: u'SELECT input_cache.id AS input_cache_id, input_cache.name AS input_cache_name, input_cache.hash AS input_cache_hash, input_cache.added AS input_cache_added \nFROM input_cache \nWHERE input_cache.name = ? AND input_cache.hash = ? AND input_cache.added > ?\n LIMIT ? OFFSET ?'] [parameters: ('trakt_list', '3df51d701f7fcc73456449b7fe0b6d7f', '2018-06-03 11:23:20.428290', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:23 CRITICAL manager       monitor-rss     An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.132330476915.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 13:23 WARNING  task          monitor-rss     Aborting task (plugin: configure_series)
2018-06-03 13:49 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 13:49 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.134936608970.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 14:19 INFO     content_size  monitor-rss     Entry `Air Doll 2009 1080p BluRay x264-USURY` too big, rejecting
2018-06-03 14:19 INFO     content_size  monitor-rss     Entry `Its Alive 1974 1080p BluRay x264-PSYCHD` too big, rejecting
2018-06-03 15:18 CRITICAL task          monitor-rss     BUG: Unhandled error in plugin configure_series: (sqlite3.OperationalError) database is locked [SQL: u'SELECT input_cache.id AS input_cache_id, input_cache.name AS input_cache_name, input_cache.hash AS input_cache_hash, input_cache.added AS input_cache_added \nFROM input_cache \nWHERE input_cache.name = ? AND input_cache.hash = ? AND input_cache.added > ?\n LIMIT ? OFFSET ?'] [parameters: ('trakt_list', '3df51d701f7fcc73456449b7fe0b6d7f', '2018-06-03 13:18:43.641603', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 15:18 CRITICAL manager       monitor-rss     An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.151853740570.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 15:18 WARNING  task          monitor-rss     Aborting task (plugin: configure_series)
2018-06-03 15:19 CRITICAL task          monitor-rss     BUG: Unhandled error in plugin status: (sqlite3.OperationalError) database is locked [SQL: u'SELECT status_task.task AS status_task_task, status_task.id AS status_task_id \nFROM status_task \nWHERE status_task.id = ?'] [parameters: (7,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 15:19 CRITICAL manager       monitor-rss     An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.151903945348.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 15:19 WARNING  task          monitor-rss     Aborting task (plugin: status)
2018-06-03 15:19 ERROR    task          monitor-rss     abort handlers aborted: 
Traceback (most recent call last):
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 617, in _execute
    self.__run_task_phase('abort')
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 453, in __run_task_phase
    response = self.__run_plugin(plugin, phase, args)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 519, in __run_plugin
    self.abort(msg, traceback=traceback)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 370, in abort
    raise TaskAbort(reason, silent=silent)
TaskAbort
2018-06-03 15:19 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
Traceback (most recent call last):
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task_queue.py", line 48, in run
    self.current_task.execute()
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 72, in wrapper
    return func(self, *args, **kw)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 643, in execute
    fire_event('task.execute.started', self)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/event.py", line 106, in fire_event
    result = event(*args, **kwargs)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/utils/simple_persistence.py", line 195, in load_task
    SimplePersistence.load(task.name)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/utils/simple_persistence.py", line 144, in load
    for skv in session.query(SimpleKeyValue).filter(SimpleKeyValue.task == task).all():
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2737, in all
    return list(self)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2889, in __iter__
    return self._execute_and_instances(context)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2912, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 507, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT simple_persistence.feed AS simple_persistence_feed, simple_persistence.json AS simple_persistence_json, simple_persistence.id AS simple_persistence_id, simple_persistence.plugin AS simple_persistence_plugin, simple_persistence."key" AS simple_persistence_key, simple_persistence.added AS simple_persistence_added \nFROM simple_persistence \nWHERE simple_persistence.feed = ?'] [parameters: ('irc-tv-dl',)] (Background on this error at: http://sqlalche.me/e/e3q8)
Can you attach your configs @frankyw ?
Sure here you go.
[config.yml.zip](https://github.com/Flexget/Flexget/files/2069286/config.yml.zip)

@frankyw I'm not sure what the issue is tbh. It's a very simple config. Can you stop the daemon and then run it with `--debug-db-sessions` (eg. `flexget --debug-db-sessions --debug daemon start -d`)? And then paste the _entire_ log on pastebin or similar. Trace level logging would be even better, but its usefulness kinda depends on how quickly you can make it crash :smile: 
@cvium Okay...here it is, this is the entire log, thanks so much for investigating! The crash is at 19:46-19:47 :)

P.S. This is from the refactor_trakt_api branch.

https://paste.ee/p/SgvTT
Hmm, that's a different exception though.
See if you can make it throw the Locked-exception @frankyw. The log you pasted has given me _some_ ideas, but it's not really the exception you reported initially.
@cvium I'm sorry maybe I am missing something, the log I posted refers to locked exception and is the same crash after IRC match.

Lines: 833, 851, 862, 880, etc.

I also have another example, crash file attached (I missed the full log file as it has already rotated 10+ log files!)

[crash_report.2018.06.06.061335715322.log](https://github.com/Flexget/Flexget/files/2077322/crash_report.2018.06.06.061335715322.log)
@frankyw @zosky Good news and bad news.

**Good news:**
I've located the issue. The problem is with lazy fields (eg. trakt_lookup, imdb_lookup) and `backlog` plugin, which is used internally by series `timeframe`. More specifically, this line https://github.com/Flexget/Flexget/blob/develop/flexget/plugins/filter/series.py#L2131 forces an evaluation of _all_ lazy fields, which runs in a separate db session, but `series` already has a lock on the db at this point, which is why it crashes.

A quick fix is to add `object_session(episode).commit()` before this line or simply don't use lookup plugins with `timeframe`.

**Bad news:**
It's not an easy thing to fix. It's a fundamental problem with how we've implemented lazy lookups. It could take a long while to fix this properly. Sorry.
@cvium thank you for getting to the bottom of this & explaining _why_ is it crashing. 

pardon me, i still dont think i understand *what* is failing ? it seem like everything is  working ? my eps are getting adding to backlog, judged & upgraded...  it restarts (allot) and continues where it left off. 

is it loosing things that should have hit the backlog ? am i hammering trakt with requests for meta ? 

i'll try try the quick fix in a few days (when i have time to watch) & let you know
It only fails to save the lookups I think
@zosky did the quick fix work to stop the crashes mate?

@cvium thanks for tracking down the issue!
for years (i think) i've had this in cron. it ugly, but keeps things tidy
`@hourly	find ~/.flexget/ -name "crash_report*" -delete`

im just now getting around to turning this off and trying the suggested
seems no more. need to let it sit for a bit

**UPDATE** -- 5 hrs now, no crashes yet. seems great
- 4 added by target, 
- 3 added by timeframe 
- 18 still in the backlog 

thanks again
@gazpachoking whats the best way to debug this?

can you run flexget with --debug-db-sessions when you get the error and paste the full log.

I am also getting the same "database is locked" error on mine. I'm not sure if this is in any way related to #846, as the resulting error is the same. The errors I am getting are as follows. The package appears to be different in mine (`pysqlite2.dbapi2.OperationalError`), but the statements appear to be on the same lines in code. I will run with --debug-db-sessions and post a crash log if/when one is generated.

```
2016-04-04 01:55 ERROR    lazy_lookup   fetch-series    Unhandled error in lazy lookup plugin
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/lazy_dict.py", line 36, in __getitem__
    func(self.store)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 109, in lazy_series_lookup
    return self.series_lookup(entry, self.series_map)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 102, in series_lookup
    tvdb_id=entry.get('tvdb_id', eval_lazy=False), session=session)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 27, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/api_tvdb.py", line 426, in lookup_series
    _update_search_strings(series, search=name)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/sqlalchemy_utils.py", line 137, in __exit__
    self.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 801, in commit
    self.transaction.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 392, in commit
    self._prepare_impl()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 372, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2019, in flush
    self._flush(objects)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2137, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2101, in _flush
    flush_context.execute()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
    rec.execute(self)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
    uow
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
    mapper, table, insert)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 800, in _emit_insert_statements
    execute(statement, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (pysqlite2.dbapi2.OperationalError) database is locked [SQL: u'INSERT INTO tvdb_search_results (search, series_id) VALUES (?, ?)'] [parameters: (u'chicago fire (2012)', 258541)]
```

```
2016-04-04 03:55 ERROR    lazy_lookup   fetch-series    Unhandled error in lazy lookup plugin
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/lazy_dict.py", line 36, in __getitem__
    func(self.store)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 109, in lazy_series_lookup
    return self.series_lookup(entry, self.series_map)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 102, in series_lookup
    tvdb_id=entry.get('tvdb_id', eval_lazy=False), session=session)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 27, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/api_tvdb.py", line 426, in lookup_series
    _update_search_strings(series, search=name)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/sqlalchemy_utils.py", line 137, in __exit__
    self.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 801, in commit
    self.transaction.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 392, in commit
    self._prepare_impl()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 372, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2019, in flush
    self._flush(objects)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2137, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2101, in _flush
    flush_context.execute()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
    rec.execute(self)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
    uow
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
    mapper, table, insert)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 800, in _emit_insert_statements
    execute(statement, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (pysqlite2.dbapi2.OperationalError) database is locked [SQL: u'INSERT INTO tvdb_search_results (search, series_id) VALUES (?, ?)'] [parameters: (u'chicago fire (2012)', 258541)]
```

```
2016-04-04 22:45 ERROR    lazy_lookup   fetch-series    Unhandled error in lazy lookup plugin
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/lazy_dict.py", line 36, in __getitem__
    func(self.store)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 109, in lazy_series_lookup
    return self.series_lookup(entry, self.series_map)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 102, in series_lookup
    tvdb_id=entry.get('tvdb_id', eval_lazy=False), session=session)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 27, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/api_tvdb.py", line 426, in lookup_series
    _update_search_strings(series, search=name)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/sqlalchemy_utils.py", line 137, in __exit__
    self.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 801, in commit
    self.transaction.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 392, in commit
    self._prepare_impl()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 372, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2019, in flush
    self._flush(objects)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2137, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2101, in _flush
    flush_context.execute()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
    rec.execute(self)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
    uow
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
    mapper, table, insert)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 800, in _emit_insert_statements
    execute(statement, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (pysqlite2.dbapi2.OperationalError) database is locked [SQL: u'INSERT INTO tvdb_search_results (search, series_id) VALUES (?, ?)'] [parameters: (u'chicago fire (2012)', 258541)]
```

can you please paste the full debug log with  --debug-db-sessions enabled.

Here is the full log with `flexget -L debug --debug-db-sessions execute --tasks fetch-series`. This is a fresh log file, created just for this execution, with no daemon running in the background. This is running 1.2.501.

```
2016-04-05 00:57 DEBUG    manager                       Figuring out config load paths
2016-04-05 00:57 DEBUG    manager                       Found config: /home/steven/.flexget/config.yml
2016-04-05 00:57 DEBUG    manager                       Config file /home/steven/.flexget/config.yml selected
2016-04-05 00:57 DEBUG    manager                       sys.defaultencoding: ascii
2016-04-05 00:57 DEBUG    manager                       sys.getfilesystemencoding: UTF-8
2016-04-05 00:57 DEBUG    manager                       os.path.supports_unicode_filenames: False
2016-04-05 00:57 DEBUG    plugin                        Trying to load plugins from: [u'/home/steven/.flexget/plugins', '/usr/local/lib/python2.7/dist-packages/flexget/plugins']
2016-04-05 00:57 DEBUG    safe                          Reading from cache file /tmp/safe-0.4.words.cache
2016-04-05 00:57 DEBUG    plugin                        Plugin `memusage` requires `ext lib `guppy`` to load.
2016-04-05 00:57 DEBUG    deluge                        ConfigManager started..
2016-04-05 00:57 DEBUG    plugin                        Plugins took 5.82 seconds to load
2016-04-05 00:57 DEBUG    manager                       Connecting to: sqlite:////home/steven/.flexget/db-config.sqlite
2016-04-05 00:57 DEBUG    manager                       config_name: config
2016-04-05 00:57 DEBUG    manager                       config_base: /home/steven/.flexget
2016-04-05 00:57 DEBUG    manager                       New config data loaded.
2016-04-05 00:57 DEBUG    parsing                       setting default movie parser to internal. (options: {u'internal': <flexget.plugins.parsers.parser_internal.ParserInternal object at 0x7fb1e11cde10>, u'guessit': <flexget.plugins.parsers.parser_guessit.ParserGuessit object at 0x7fb1e11a84d0>})
2016-04-05 00:57 DEBUG    parsing                       setting default series parser to internal. (options: {u'internal': <flexget.plugins.parsers.parser_internal.ParserInternal object at 0x7fb1e11cde10>, u'guessit': <flexget.plugins.parsers.parser_guessit.ParserGuessit object at 0x7fb1e11a84d0>})
2016-04-05 00:57 DEBUG    cron_env                      Encoding UTF-8 stored
2016-04-05 00:57 DEBUG    util.simple_persistence                 setting key terminal_encoding value 'UTF-8'
2016-04-05 00:57 DEBUG    task_queue                    task queue shutdown requested
2016-04-05 00:57 VERBOSE  task_queue                    There are 1 tasks to execute. Shutdown will commence when they have completed.
2016-04-05 00:57 INFO     ipc.rpyc                      server started on [127.0.0.1]:42506
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DE715A50 opened ('flexget.utils.simple_persistence', 134, 'load', 'for skv in session.query(SimpleKeyValue).filter(SimpleKeyValue.task == task).all():')
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DE715A50 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.0244059562683)
2016-04-05 00:57 DEBUG    task          fetch-series    executing fetch-series
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DE715D90 opened ('flexget.task', 511, '_execute', 'last_hash = session.query(TaskConfigHash).filter(TaskConfigHash.task == self.name).first()')
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DE715D90 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.0242478847504)
2016-04-05 00:57 DEBUG    template      fetch-series    Merging template global into task fetch-series
2016-04-05 00:57 DEBUG    logfilter     fetch-series    Log filter 140401899576656 added (context "series", term "is already configured in series plugin")
2016-04-05 00:57 DEBUG    logfilter     fetch-series    Log filter 140401899576720 added (context "parser_internal", term "appears to be an episode pack")
2016-04-05 00:57 DEBUG    disable       fetch-series    Disabled built-in plugin(s): entry_operations, template, scan_imdb, torrent_files, backlog, change_warn, include, nzb_size, retry_failed, torrent_cache, torrent_size, metainfo_content_size, proxy, urlrewriting, verbose, dump, urlfix, seen_info_hash, remember_rejected, metainfo_task, torrent, history, seen, details, dump_config, series_db, --try-regexp, metainfo_quality, magnet_btih
2016-04-05 00:57 DEBUG    exec          fetch-series    phase cmd: rm -f '/tmp/trakt_series.txt' && touch '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: rm -f '/tmp/trakt_series.txt' && touch '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    input_cache   fetch-series    cache name: trakt_list_871e06b74ced311c907be93dbb7c6f20 (has: )
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD5A7750 opened ('flexget.utils.cached_input', 129, 'wrapped_func', 'filter(InputCache.added > datetime.now() - self.persist).\\')
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD5A7750 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.0287930965424)
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD5995D0 opened ('flexget.plugins.api_trakt', 125, 'get_access_token', 'acc = session.query(TraktUserAuth).filter(TraktUserAuth.account == account).first()')
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD5995D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.0270419120789)
2016-04-05 00:57 VERBOSE  trakt_list    fetch-series    Retrieving `shows` list `series`
2016-04-05 00:57 DEBUG    utils.requests fetch-series    Fetching https://api-v2launch.trakt.tv/users/me/lists/series/items
2016-04-05 00:57 DEBUG    input_cache   fetch-series    storing to cache trakt_list_871e06b74ced311c907be93dbb7c6f20 48 entries
2016-04-05 00:57 DEBUG    input_cache   fetch-series    Storing cache trakt_list_871e06b74ced311c907be93dbb7c6f20 to database.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD58CE50 opened ('flexget.utils.cached_input', 177, 'wrapped_func', 'filter(InputCache.hash == hash).first()')
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD58CE50 writing ('flexget.utils.cached_input', 182, 'wrapped_func', 'session.merge(db_cache)') new: (<flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf73d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7550>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced550>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7450>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf74d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7150>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced510>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd58cf90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced590>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced5d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7650>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf76d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced710>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7750>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7850>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced890>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf78d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced910>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7950>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced990>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcceda10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcceda90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedb10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedb90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedc10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced3d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedc90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedd10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7350>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedd90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced410>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccede10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd58ce90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd58ced0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedf10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf77d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccedf90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7050>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf75d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf70d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced110>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced150>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced4d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf71d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7250>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccede90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf72d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcced850>) deleted: () dirty: (<flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09350>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd098d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd093d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09450>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f490>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd094d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd5a7d90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f3d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd095d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f650>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09650>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd5b8690>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd096d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f790>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f850>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd5998d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f910>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09950>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1de7158d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd099d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09d50>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09a90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1fad0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09b10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09b90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7bd0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd5a7c10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09c50>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7c90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f550>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09750>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09dd0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd5a7b10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd599e10>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09e50>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dd60fe90>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09ed0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09f50>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f9d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f050>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f110>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09850>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dccf7d50>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09190>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f1d0>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09550>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd09250>, <flexget.utils.cached_input.InputCacheEntry object at 0x7fb1dcd1f2d0>, <flexget.utils.cached_input.InputCache object at 0x7fb1dcced790>)
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DD58CE50 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.467740058899)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase on_input not configured
2016-04-05 00:57 DEBUG    exec          fetch-series    phase on_filter not configured
2016-04-05 00:57 DEBUG    exec          fetch-series    running phase_name: on_output operation: for_entries entries: 48
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Elementary (2012) 255316
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCCED8D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Getting updates from thetvdb (1459824232)
2016-04-05 00:57 DEBUG    util.simple_persistence fetch-series    setting key auth_tokens value {u'default': u'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NTk4MzU3MzAsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDU5NzQ5MzMwfQ.Q0IVv0spOPI1Wasc-IzZZLyhKYlYecYNC6XtSVnKede4daOnwbvHkuSTI4Na3tELITXfP1OD77M7znDvZrDJ2w134XsBt5VNAEgkARzQxx1ifIE1jPPNYriPVzphetII8Rlr6B7g4ChALmXV1kKPqBUL_Dai-76v6NV6UZm5Lw7bTsZhB3nfadBz7___MaOunowNutp0oRCkymhL5ZxaDPstwseGrh5HJ7QgVgV8j_WEPV7ZFJv4-FtHhNQMG17wmWxFLNfwbMD2H-bOTvceU5oOZTLbuIqfa6rMJccrhhejkNzm7YvBvbMjyOLvECq70SLq0FW1TXKAhSd8tV-g3w'}
2016-04-05 00:57 DEBUG    utils.requests fetch-series    Fetching https://api-beta.thetvdb.com/updated/query
2016-04-05 00:57 DEBUG    util.simple_persistence fetch-series    setting key last_check value datetime.datetime(2016, 4, 5, 4, 57, 30, 670744)
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Elementary (2012),tvdb_id=255316> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCCED8D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.612282991409)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Elementary" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Elementary" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Homeland (2011) 247897
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCCED0D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Homeland (2011),tvdb_id=247897> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCCED0D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.109487056732)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Homeland" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Homeland" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Once Upon a Time (2011) 248835
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC81850 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Once Upon a Time (2011),tvdb_id=248835> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC81850 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110621929169)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Once Upon a Time (2011)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Once Upon a Time (2011)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Originals (2013) 266883
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D7D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Originals (2013),tvdb_id=266883> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D7D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.112577915192)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Originals" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Originals" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Sleepy Hollow (2013) 269578
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D790 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Sleepy Hollow (2013),tvdb_id=269578> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D790 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.106371879578)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Sleepy Hollow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Sleepy Hollow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Marvel's Agents of S.H.I.E.L.D. (2013) 263365
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8DD10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Marvel's Agents of S.H.I.E.L.D. (2013),tvdb_id=263365> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8DD10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.107441186905)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Marvels Agents of S.H.I.E.L.D." >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Marvels Agents of S.H.I.E.L.D." >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Vampire Diaries (2009) 95491
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D0D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Vampire Diaries (2009),tvdb_id=95491> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D0D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110584974289)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Vampire Diaries" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Vampire Diaries" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Blacklist (2013) 266189
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D850 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Blacklist (2013),tvdb_id=266189> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D850 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.105668783188)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Blacklist" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Blacklist" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Big Bang Theory (2007) 80379
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCD16D90 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Big Bang Theory (2007),tvdb_id=80379> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCD16D90 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.107741117477)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Big Bang Theory" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Big Bang Theory" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Chicago Fire (2012) 258541
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D9D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 VERBOSE  api_tvdb      fetch-series    Data for Chicago Fire has expired, refreshing from tvdb
2016-04-05 00:57 DEBUG    util.simple_persistence fetch-series    setting key auth_tokens value {u'default': u'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NTk4MzU3MzAsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDU5NzQ5MzMwfQ.Q0IVv0spOPI1Wasc-IzZZLyhKYlYecYNC6XtSVnKede4daOnwbvHkuSTI4Na3tELITXfP1OD77M7znDvZrDJ2w134XsBt5VNAEgkARzQxx1ifIE1jPPNYriPVzphetII8Rlr6B7g4ChALmXV1kKPqBUL_Dai-76v6NV6UZm5Lw7bTsZhB3nfadBz7___MaOunowNutp0oRCkymhL5ZxaDPstwseGrh5HJ7QgVgV8j_WEPV7ZFJv4-FtHhNQMG17wmWxFLNfwbMD2H-bOTvceU5oOZTLbuIqfa6rMJccrhhejkNzm7YvBvbMjyOLvECq70SLq0FW1TXKAhSd8tV-g3w'}
2016-04-05 00:57 DEBUG    utils.requests fetch-series    Fetching https://api-beta.thetvdb.com/series/258541
2016-04-05 00:57 WARNING  debug_db_sess fetch-series    Sessions from 2 threads! Transaction 0x7FB1DCCED9D0 opened ('flexget.plugins.api_tvdb', 108, '_get_db_genres', 'genre = session.query(TVDBGenre).filter(func.lower(TVDBGenre.name) == genre_name.lower()).first()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0x7fb1dcc8d9d0>: (1459832254.061676, <sqlalchemy.pool._ConnectionFairy object at 0x7fb1dcc8d8d0>, 'flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')}
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCCED9D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.132996082306)
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D9D0 writing ('flexget.plugins.api_tvdb', 372, '_update_search_strings', 'search_strings = series.search_strings') new: () deleted: () dirty: (<TVDBSeries name=Chicago Fire,tvdb_id=258541>, <flexget.plugins.api_tvdb.TVDBGenre object at 0x7fb1dcc41650>, <flexget.plugins.api_tvdb.TVDBGenre object at 0x7fb1dcc415d0>)
2016-04-05 00:57 WARNING  debug_db_sess fetch-series    Sessions from 2 threads! Transaction 0x7FB1DCC41550 opened ('flexget.plugins.api_tvdb', 377, '_update_search_strings', 'func.lower(TVDBSearchResult.search) == name).first()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0x7fb1dcc8d9d0>: (1459832254.061676, <sqlalchemy.pool._ConnectionFairy object at 0x7fb1dcc8d8d0>, 'flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')}
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC41550 writing ('flexget.plugins.api_tvdb', 377, '_update_search_strings', 'func.lower(TVDBSearchResult.search) == name).first()') new: () deleted: () dirty: (<flexget.plugins.api_tvdb.TVDBSearchResult object at 0x7fb1dcbff710>,)
2016-04-05 00:57 WARNING  debug_db_sess fetch-series    Transaction 0x7FB1DCC41550 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.close()') (open time 10.3630418777)
2016-04-05 00:57 WARNING  debug_db_sess fetch-series    Transaction 0x7FB1DCC8D9D0 closed ('flexget.utils.sqlalchemy_utils', 139, '__exit__', 'self.rollback()') (open time 11.6950700283)
2016-04-05 00:57 ERROR    lazy_lookup   fetch-series    Unhandled error in lazy lookup plugin
2016-04-05 00:57 CRITICAL manager       fetch-series    An unexpected crash has occurred. Writing crash report to /home/steven/.flexget/crash_report.2016.04.05.005745833110.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 1.2.501
2016-04-05 00:57 DEBUG    manager       fetch-series    Traceback:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/lazy_dict.py", line 36, in __getitem__
    func(self.store)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 109, in lazy_series_lookup
    return self.series_lookup(entry, self.series_map)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py", line 102, in series_lookup
    tvdb_id=entry.get('tvdb_id', eval_lazy=False), session=session)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 27, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/api_tvdb.py", line 426, in lookup_series
    _update_search_strings(series, search=name)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/sqlalchemy_utils.py", line 137, in __exit__
    self.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 801, in commit
    self.transaction.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 392, in commit
    self._prepare_impl()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 372, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2019, in flush
    self._flush(objects)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2137, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2101, in _flush
    flush_context.execute()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
    rec.execute(self)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
    uow
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
    mapper, table, insert)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 800, in _emit_insert_statements
    execute(statement, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (pysqlite2.dbapi2.OperationalError) database is locked [SQL: u'INSERT INTO tvdb_search_results (search, series_id) VALUES (?, ?)'] [parameters: (u'chicago fire (2012)', 258541)]
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "None" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "None" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Vikings (2013) 260449
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D890 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Vikings (2013),tvdb_id=260449> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D890 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.106513023376)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Vikings" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Vikings" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Fosters (2013) 267907
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D190 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Fosters (2013),tvdb_id=267907> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D190 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.107897043228)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Fosters (2013)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Fosters (2013)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for TURN: Washington's Spies (2014) 272135
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFA50 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=TURN: Washington's Spies (2014),tvdb_id=272135> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFA50 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.107362031937)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "TURN: Washingtons Spies" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "TURN: Washingtons Spies" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Call the Midwife (2012) 255192
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Call the Midwife (2012),tvdb_id=255192> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.109475851059)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Call the Midwife" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Call the Midwife" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Nashville (2012) 259055
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC41550 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Nashville (2012),tvdb_id=259055> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC41550 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.104348897934)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Nashville (2012)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Nashville (2012)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for House of Lies (2012) 247909
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF250 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=House of Lies (2012),tvdb_id=247909> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF250 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.105333089828)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "House of Lies" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "House of Lies" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Halt and Catch Fire (2014) 271910
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF590 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Halt and Catch Fire (2014),tvdb_id=271910> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF590 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.108228206635)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Halt and Catch Fire" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Halt and Catch Fire" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Minority Report (2015) 295680
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Minority Report (2015),tvdb_id=295680> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.105751991272)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Minority Report" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Minority Report" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Quantico (2015) 295515
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD90 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Quantico (2015),tvdb_id=295515> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD90 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.105674982071)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Quantico" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Quantico" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for DC's Legends of Tomorrow (2016) 295760
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AA10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=DC's Legends of Tomorrow (2016),tvdb_id=295760> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AA10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.10710477829)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "DCs Legends of Tomorrow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "DCs Legends of Tomorrow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Limitless (2015) 295743
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AA10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Limitless (2015),tvdb_id=295743> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AA10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.113322019577)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Limitless" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Limitless" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Ripper Street (2012) 260485
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AFD0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Ripper Street (2012),tvdb_id=260485> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AFD0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.11244893074)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Ripper Street" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Ripper Street" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Family Guy (1999) 75978
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF810 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Family Guy (1999),tvdb_id=75978> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF810 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.120397090912)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Family Guy" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Family Guy" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Simpsons (1989) 71663
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AF10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Simpsons (1989),tvdb_id=71663> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AF10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.113327980042)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Simpsons" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Simpsons" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Arrow (2012) 257655
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A210 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Arrow (2012),tvdb_id=257655> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A210 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110754966736)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Arrow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Arrow" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Modern Family (2009) 95011
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF790 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Modern Family (2009),tvdb_id=95011> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF790 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110137939453)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Modern Family" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Modern Family" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Musketeers (2014) 269159
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFE10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Musketeers (2014),tvdb_id=269159> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFE10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.128804922104)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Musketeers" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Musketeers" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Flash (2014) 279121
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF250 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Flash (2014),tvdb_id=279121> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF250 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.11040186882)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Flash (2014)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Flash (2014)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Brooklyn Nine-Nine (2013) 269586
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A590 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Brooklyn Nine-Nine (2013),tvdb_id=269586> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A590 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.112406015396)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Brooklyn Nine-Nine" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Brooklyn Nine-Nine" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Black Sails (2014) 262407
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Black Sails (2014),tvdb_id=262407> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110274076462)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Black Sails" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Black Sails" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Faking It (2014) 277169
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3ACD0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Faking It (2014),tvdb_id=277169> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3ACD0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.109177112579)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Faking It (2014)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Faking It (2014)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Lucifer (2016) 295685
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF190 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Lucifer (2016),tvdb_id=295685> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF190 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.110256910324)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Lucifer" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Lucifer" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Bitten (2014) 269550
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF490 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Bitten (2014),tvdb_id=269550> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF490 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.109037160873)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Bitten" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Bitten" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for 2 Broke Girls (2011) 248741
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF190 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=2 Broke Girls (2011),tvdb_id=248741> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF190 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.11101603508)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "2 Broke Girls" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "2 Broke Girls" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Strain (2014) 276564
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A850 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Strain (2014),tvdb_id=276564> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A850 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.112704992294)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Strain" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Strain" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Penny Dreadful (2014) 265766
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AC50 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Penny Dreadful (2014),tvdb_id=265766> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AC50 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.111121177673)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Penny Dreadful" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Penny Dreadful" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for New Girl (2011) 248682
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D890 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=New Girl (2011),tvdb_id=248682> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8D890 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.115052938461)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "New Girl" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "New Girl" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Project Runway (2004) 74285
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD90 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Project Runway (2004),tvdb_id=74285> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD90 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.122241020203)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Project Runway" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Project Runway" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Person of Interest (2011) 248742
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF690 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Person of Interest (2011),tvdb_id=248742> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF690 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.114757061005)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Person of Interest" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Person of Interest" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Project Runway All Stars (2012) 253682
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Project Runway All Stars (2012),tvdb_id=253682> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF750 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.11353802681)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Project Runway All Stars" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Project Runway All Stars" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Project Runway Junior (2015) 300486
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Project Runway Junior (2015),tvdb_id=300486> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.111170053482)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Project Runway Junior" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Project Runway Junior" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Girls (2012) 220411
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Girls (2012),tvdb_id=220411> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A710 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.121407032013)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Girls" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Girls" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for The Americans (2013) 261690
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A0D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=The Americans (2013),tvdb_id=261690> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A0D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.120532989502)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "The Americans (2013)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "The Americans (2013)" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Line of Duty (2012) 260092
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8DDD0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Line of Duty (2012),tvdb_id=260092> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCC8DDD0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.112644910812)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Line of Duty" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Line of Duty" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Grimm (2011) 248736
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD50 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Grimm (2011),tvdb_id=248736> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFFD50 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.113950967789)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Grimm" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Grimm" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for True Detective (2014) 270633
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A5D0 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=True Detective (2014),tvdb_id=270633> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3A5D0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.114617109299)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "True Detective" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "True Detective" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Devious Maids (2013) 261802
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AB10 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Devious Maids (2013),tvdb_id=261802> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCB3AB10 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.11248087883)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Devious Maids" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Devious Maids" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Looking up tvdb information for Blunt Talk (2015) 281181
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF510 opened ('flexget.plugins.api_tvdb', 412, 'lookup_series', 'series = session.query(TVDBSeries).filter(TVDBSeries.id == tvdb_id).first()')
2016-04-05 00:57 DEBUG    api_tvdb      fetch-series    Series <name=Blunt Talk (2015),tvdb_id=281181> information restored from cache.
2016-04-05 00:57 DEBUG    debug_db_sess fetch-series    Transaction 0x7FB1DCBFF510 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.115611076355)
2016-04-05 00:57 DEBUG    exec          fetch-series    phase_name: on_output operation: for_entries cmd: echo "Blunt Talk" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Blunt Talk" >> '/tmp/trakt_series.txt'
2016-04-05 00:57 DEBUG    exec          fetch-series    phase cmd: echo "Done!"
2016-04-05 00:57 VERBOSE  exec          fetch-series    Executing: echo "Done!"
2016-04-05 00:57 INFO     exec          fetch-series    Stdout: Done!\n
2016-04-05 00:57 DEBUG    disable       fetch-series    Re-enabled builtin plugin(s): entry_operations, template, scan_imdb, torrent_files, backlog, change_warn, include, nzb_size, retry_failed, torrent_cache, torrent_size, metainfo_content_size, proxy, urlrewriting, verbose, dump, urlfix, seen_info_hash, remember_rejected, metainfo_task, torrent, history, seen, details, dump_config, series_db, --try-regexp, metainfo_quality, magnet_btih
2016-04-05 00:57 DEBUG    logfilter     fetch-series    Log filter 140401899576656 removed
2016-04-05 00:57 DEBUG    logfilter     fetch-series    Log filter 140401899576720 removed
2016-04-05 00:57 DEBUG    util.simple_persistence fetch-series    Flushing simple persistence for task fetch-series to db.
2016-04-05 00:57 DEBUG    task_queue                    task queue shut down
2016-04-05 00:57 INFO     ipc.rpyc                      listener closed
2016-04-05 00:57 INFO     ipc.rpyc                      server has terminated
2016-04-05 00:57 DEBUG    util.simple_persistence                 Flushing simple persistence for task None to db.
2016-04-05 00:57 DEBUG    debug_db_sess                 Transaction 0x7FB1DCB4D490 opened ('flexget.utils.simple_persistence', 153, 'flush', 'synchronize_session=False')
2016-04-05 00:57 DEBUG    debug_db_sess                 Transaction 0x7FB1DCB4D490 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 0.241051912308)
2016-04-05 00:57 DEBUG    manager                       Shutting down
2016-04-05 00:57 DEBUG    manager                       Removed /home/steven/.flexget/.config-lock
```

It doesn't seem to be resolved yet, v1.2.502:

``` logtalk
2016-04-06 03:54 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.OperationalError) database is
 locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [paramet
ers: (2124, '2016-04-06 03:54:00.945351')]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 438, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 22, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/remember_rejected.py", line 94, in on_task_start
    filter(RememberEntry.expires < datetime.now()).delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3048, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2124, '2016-04-06 03:54:00.945351')]
```

i dont think this has anything to do with tvdb.. no  idea whats causing it..

which os are you on?

It is OSMC (Raspbian - Debian 8), latest updates, on RPi 1 Model B, 256 MB RAM, ext4 on sdcard.

1.2.503 appeared to fix the issue for me, which I believe is where the patch is. The database locked issue appears to be a larger issue though, as there are other issues with similar 'database is locked' errors. I am no longer getting any errors like this on mine. I am using Ubuntu 14.04 (Kodi) on an older computer (~5-6 years old). Since I have switched from the UpStart script, and using cron to initiate the daemon mode on login, I have had no other issues with locked databases, including the one causing flexget to stop working with the scheduler.

Sorry, unfortunately I can't confirm this, since I've got this today with 1.2.505:

``` logtalk
 2016-04-09 04:15 CRITICAL task          nC_notify-Progs BUG: Unhandled error
in plugin remember_rejected: (sqlite3.OperationalError) database is locked [S
QL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2124, '2016-04
-09 04:15:34.922301')]
Traceback (most recent call last):                                             File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 438, in
 __run_plugin
    return method(*args, **kwargs)                                             File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 22, in
 __call__
    return self.func(*args, **kwargs)                                          File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/remembe
r_rejected.py", line 94, in on_task_start
    filter(RememberEntry.expires < datetime.now()).delete()                    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line
 3048, in delete
    delete_op.exec_()                                                          File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py"
, line 1127, in exec_
    self._do_exec()                                                            File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec                                                         mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2124, '2016-04-09 04:15:34.922301')]
```

can you run task with `--debug-db-sessions`?

Sure, I've started daemon with that switch. I'll comment back, if the crash occurs.

Here, you got one:
`$ flexget database cleanup && flexget database vacuum`

``` logtalk
There is a FlexGet process already running for this config, sending execution there.
2016-04-15 16:01 INFO     manager                       Running database cleanup.
2016-04-15 16:01 WARNING  debug_db_sess                 Sessions from 2 threads! Transaction 0xB348E5F0 opened ('flexget.utils.simple_persistence', 71, 'db_cleanup', 'session.query(SimpleKeyValue).filter(~SimpleKeyValue.task.in_(existing_tasks)).delete(synchronize_session=False)') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb195e730>: (1460728871.683226, <sqlalchemy.pool._ConnectionFairy object at 0xb348e2b0>, 'flexget.plugins.filter.series', 1608, 'on_task_start', 'session.query(SeriesTask).filter(SeriesTask.name == task.name).delete()')}
2016-04-15 16:01 VERBOSE  util.log                      Purged 106 entries from log_once table.
2016-04-15 16:01 VERBOSE  series                        Removed 6 undownloaded episode releases.
2016-04-15 16:01 VERBOSE  series                        Removed 1 series without episodes.
2016-04-15 16:01 INFO     db_analyze                    Running ANALYZE on database to improve performance.
2016-04-15 16:01 WARNING  debug_db_sess                 Transaction 0xB348E5F0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 10.5224280357)
2016-04-15 16:01 WARNING  debug_db_sess                 Sessions from 2 threads! Transaction 0xB3E6EE30 opened ('flexget.task', 55, 'config_changed', 'task_hash.delete()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb195eeb0>: (1460728880.923322, <sqlalchemy.pool._ConnectionFairy object at 0xb19279d0>, 'flexget.plugins.filter.remember_rejected', 83, 'on_task_start', 'old_task = session.query(RememberTask).filter(RememberTask.name == task.name).first()')}
2016-04-15 16:01 WARNING  debug_db_sess                 Transaction 0xB3E6EE30 closed ('flexget.utils.sqlalchemy_utils', 139, '__exit__', 'self.rollback()') (open time 17.0491540432)
Traceback (most recent call last):
  File "/usr/local/bin/flexget", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/flexget/__init__.py", line 37, in main
    manager.start()
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 286, in start
    client.handle_cli(self.args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 196, in __call__
    return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 71, in syncreq
    return conn.sync_request(handler, oid, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 441, in sync_request
    raise obj
rpyc.core.vinegar/sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked

========= Remote Traceback (1) =========
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 305, in _dispatch_request
    res = self._HANDLERS[handler](self, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 535, in _handle_call
    return self._local_objects[oid](*args, **dict(kwargs))
  File "/usr/local/lib/python2.7/dist-packages/flexget/ipc.py", line 79, in exposed_handle_cli
    self.manager.handle_cli(options)
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 330, in handle_cli
    options.cli_command_callback(self, command_options)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/cli/database.py", line 13, in do_cli
    cleanup(manager)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/cli/database.py", line 23, in cleanup
    manager.db_cleanup(force=True)
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 838, in db_cleanup
    self.config_changed()
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 613, in config_changed
    config_changed()
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 55, in config_changed
    task_hash.delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3048, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM feed_config_hash']
```

this still an issue?

Yes it is, I can still reproduce with the command I wrote in my previous comment: `$ flexget database cleanup && flexget database vacuum`

any change i can get a copy of your db and config? I can't reproduce the problem so it's hard to t-shoot.

Yes, I can send you the config & the DB (via IRC), but I don't know, does my DB contains any sensitive data? (Like what I'm hiding from main config, using the secrets plugin)

I don't think anything sensitive is in there but i can't be 100% sure as i haven't seen how all the plugin work.

Ok, I'll check that and send you during the weekend.

Meanwhile, I got some other kind of bug here, what is used to happen also - it happens while the unattended upgrades are running about 4 AM:

``` logtalk
2016-04-21 03:53 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB1010EF0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 18.3665368557)0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 3.19134020805)
2016-04-21 03:43 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB0D6F890 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.04611611366)
2016-04-21 03:43 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB10254F0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.1364710331)
2016-04-21 03:43 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB08953B0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.3491089344)
2016-04-21 03:43 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB1A22AF0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.78661489487)
2016-04-21 03:44 WARNING  debug_db_sess nC_auto         Transaction 0xB155EB7
2016-04-21 03:43 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB1A22AF0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.78661489487)
2016-04-21 03:44 WARNING  debug_db_sess nC_auto         Transaction 0xB155EB70 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.69811081886)
2016-04-21 03:44 WARNING  debug_db_sess nC_auto         Transaction 0xB0D6F910 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.76001906395)
2016-04-21 03:44 WARNING  debug_db_sess nC_auto         Transaction 0xB0886970 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 2.75373601913)
2016-04-21 03:53 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB1010EF0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 18.3665368557)
2016-04-21 03:55 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB10047F0 closed ('flexget.utils.sqlalchemy_utils', 137, '__exit__', 'self.commit()') (open time 16.8824019432)
2016-04-21 03:55 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin retry_failed: (sqlite3.OperationalError) disk I/O error [SQL: u'SELECT failed.id AS failed_id, failed.title AS failed_title, failed.url AS failed_url, failed.tof AS failed_tof, failed.reason AS failed_reason, failed.count AS failed_count, failed.retry_time AS failed_retry_time \nFROM failed \nWHERE failed.title = ? AND failed.url = ?\n LIMIT ? OFFSET ?'] [parameters: (u'SomeStuff [Series (HD)]', u'https://site.tldtorrents.php?action=details&id=195904', 1, 0)]
2016-04-21 03:55 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0B63570 closed ('flexget.utils.sqlalchemy_utils', 139, '__exit__', 'self.rollback()') (open time 9.22885513306)
2016-04-21 03:55 CRITICAL task_queue                    BUG: Unhandled exception during task queue run loop.
2016-04-21 03:55 WARNING  debug_db_sess                 Transaction 0xB1093210 closed ('flexget.utils.sqlalchemy_utils', 139, '__exit__', 'self.rollback()') (open time 2.02223086357)
2016-04-21 04:10 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 
2016-04-21 04:08:46 CEST)" skipped: maximum number of running instances reached (1)                      
2016-04-21 04:24 WARNING  apscheduler.scheduler                 Execution of job "nC_notify* (trigger: interval[0:26:00], next run at: 
2016-04-21 04:24:46 CEST)" skipped: maximum number of running instances reached (1)             
2016-04-21 04:24 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 
2016-04-21 04:24:46 CEST)" skipped: maximum number of running instances reached (1)                      
2016-04-21 04:40 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 
2016-04-21 04:40:46 CEST)" skipped: maximum number of running instances reached (1)                      
2016-04-21 04:50 WARNING  apscheduler.scheduler                 Execution of job "nC_notify* (trigger: interval[0:26:00], next run at: 
2016-04-21 04:50:46 CEST)" skipped: maximum number of running instances reached (1)             
2016-04-21 04:56 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 
2016-04-21 04:56:46 CEST)" skipped: maximum number of running instances reached (1)                      
2016-04-21 05:12 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 
2016-04-21 05:12:46 CEST)" skipped: maximum number of running instances reached (1)
```

I also had 2 empty crash_report files, but I have plenty of free space...

I've got a new one with version 2.0.4. It is about the daily unattended upgrades, running about 4 AM.

``` logtalk
crash_report.2016.04.27.042603877947.log 
2016-04-27 03:40 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB08B67B0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.00965595245)
2016-04-27 03:40 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB08B6E50 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.26596903801)
2016-04-27 03:40 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB0C45590 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.77572894096)
2016-04-27 03:40 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xAEDBBED0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.84089612961)
2016-04-27 03:41 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB0C45BB0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.23526716232)
2016-04-27 03:41 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB176DD50 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 10.3584480286)
2016-04-27 03:41 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB06BB410 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.62133002281)
2016-04-27 03:41 WARNING  debug_db_sess nC_auto         Transaction 0xB345DC30 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.98676800728)
2016-04-27 03:42 WARNING  debug_db_sess nC_auto         Transaction 0xB06BBD30 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.0725839138)
2016-04-27 03:42 WARNING  debug_db_sess nC_auto         Transaction 0xB0CD8BB0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.2459230423)
2016-04-27 03:42 WARNING  debug_db_sess nC_auto         Transaction 0xB0A248F0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.11289286613)
2016-04-27 03:42 WARNING  debug_db_sess nC_auto         Transaction 0xB21AF910 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.78115200996)
2016-04-27 03:51 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0AC65D0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.05061006546)
2016-04-27 03:51 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0AC6770 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.11864805222)
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Transaction 0xB17ED450 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.05437803268)
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB0A3CE90 opened ('flexget.plugins.metainfo.imdb_lookup', 316, 'lookup', "result = session.query(SearchResult).filter(SearchResult.title == entry['title']).first()") Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB0A3C6D0 opened ('flexget.plugins.metainfo.imdb_lookup', 316, 'lookup', "result = session.query(SearchResult).filter(SearchResult.title == entry['title']).first()") Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB0A3C030 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB0A3C890 opened ('flexget.plugins.api_tmdb', 204, 'lookup', 'movie = movie_filter.first()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08B6AB0 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08B6EB0 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0a3c610>: (1461721988.529671, <sqlalchemy.pool._ConnectionFairy object at 0xb0a82570>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 03:53 WARNING  debug_db_sess nC_movie-HUN    Transaction 0xB0A3C610 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.2348690033)
2016-04-27 03:53 WARNING  debug_db_sess nC_manual       Transaction 0xB17EAE90 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.03774690628)
2016-04-27 03:53 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB17ED7F0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.58236002922)
2016-04-27 03:54 WARNING  debug_db_sess nC_auto         Transaction 0xB0A3CAD0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.30978798866)
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08E6910 opened ('flexget.plugins.metainfo.imdb_lookup', 316, 'lookup', "result = session.query(SearchResult).filter(SearchResult.title == entry['title']).first()") Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB085F990 opened ('flexget.plugins.metainfo.imdb_lookup', 316, 'lookup', "result = session.query(SearchResult).filter(SearchResult.title == entry['title']).first()") Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08E6070 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08D3F90 opened ('flexget.plugins.api_tmdb', 204, 'lookup', 'movie = movie_filter.first()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08D3D90 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Sessions from 2 threads! Transaction 0xB08D3950 opened ('flexget.utils.log', 76, 'log_once', 'if session.query(LogMessage).filter_by(md5sum=md5sum).first():') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb08e63b0>: (1461722950.736893, <sqlalchemy.pool._ConnectionFairy object at 0xaedc8630>, 'flexget.plugins.filter.movie_queue', 175, 'matches', 'QueuedMovie.queue_name == queue_name).filter(or_(*conditions)).first()')}
2016-04-27 04:09 WARNING  debug_db_sess nC_movie-HUN    Transaction 0xB08E63B0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.41472005844)
2016-04-27 04:09 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB08D3FD0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.15081000328)
2016-04-27 04:10 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB079F510 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.40514087677)
2016-04-27 04:10 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB0A637D0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 5.65280508995)
2016-04-27 04:10 WARNING  debug_db_sess nC_auto         Transaction 0xB21EDDD0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.17441606522)
2016-04-27 04:17 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0CD83F0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 9.96705818176)
2016-04-27 04:17 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0CD8470 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 12.360298872)
2016-04-27 04:18 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB08A0B30 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.87917804718)
2016-04-27 04:18 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB06BB610 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.67803096771)
2016-04-27 04:18 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB079F090 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 10.6119608879)
2016-04-27 04:18 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB08E6090 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 22.0379400253)
2016-04-27 04:19 WARNING  debug_db_sess nC_notify-Android Transaction 0xB0CECCB0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.94045495987)
2016-04-27 04:19 WARNING  debug_db_sess nC_notify-Android Transaction 0xB1788D10 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.85944104195)
2016-04-27 04:19 WARNING  debug_db_sess nC_notify-Android Transaction 0xB21AFA30 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 12.4280328751)
2016-04-27 04:19 WARNING  debug_db_sess nC_notify-Android Transaction 0xB0A24990 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 15.3991651535)
2016-04-27 04:19 WARNING  debug_db_sess nC_notify-Android Transaction 0xB08DFB90 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.83372020721)
2016-04-27 04:25 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB0C8CF90 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 7.21403598785)
2016-04-27 04:26 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB1914250 closed ('flexget.utils.sqlalchemy_utils', 143, '__exit__', 'self.rollback()') (open time 13.5096261501)
2016-04-27 04:26 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2177, '2016-04-27 04:25:48.597339')]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 442, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/remember_rejected.py", line 97, in on_task_start
    filter(RememberEntry.expires < datetime.now()).delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3048, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2177, '2016-04-27 04:25:48.597339')]
```

I've got this this morning:

``` logtalk
...
2016-05-03 04:17 WARNING  debug_db_sess nC_auto         Transaction 0xB16EDC70 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 4.9200668335)
2016-05-03 04:26 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB1323A30 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 2.59079194069)
2016-05-03 04:27 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB182D1B0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 3.32148694992)
2016-05-03 04:29 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB3364450 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 6.78365898132)
2016-05-03 04:30 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB182DFF0 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 15.3261499405)
2016-05-03 04:30 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB3364A50 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 9.58912181854)
2016-05-03 04:30 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB3D22F10 closed ('flexget.utils.sqlalchemy_utils', 141, '__exit__', 'self.commit()') (open time 15.5697960854)
2016-05-03 04:30 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
```

And the disk was full, and it seems, that the daemon is dead...

Other 2 crashes with version 2.0.15:

``` logtalk
2016-05-10 04:09 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB163EF50 closed ('flexget.utils.sqlalchemy_utils', 143, '__exit__', 'self.rollback()') (open time 10.8980569839)
2016-05-10 04:09 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2201, '2016-05-10 04:09:31.078195')]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 442, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/remember_rejected.py", line 97, in on_task_start
    filter(RememberEntry.expires < datetime.now()).delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3048, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [parameters: (2201, '2016-05-10 04:09:31.078195')]
```

``` logtalk
2016-05-10 04:09 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB163EF50 closed ('flexget.utils.sqlalchemy_utils', 143, '__exit__', 'self.
rollback()') (open time 10.8980569839)
2016-05-10 04:09 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.OperationalError) database is
 locked [SQL: u'DELETE FROM remember_rejected_entry WHERE remember_rejected_entry.feed_id = ? AND remember_rejected_entry.expires < ?'] [paramet
ers: (2201, '2016-05-10 04:09:31.078195')]
2016-05-10 04:09 CRITICAL manager       nC_notify-Progs An unexpected crash has occurred. Writing crash report to /home/osmc/.flexget/crash_repo
rt.2016.05.10.040942589168.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_c
hecker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.0.15
2016-05-10 04:09 WARNING  task          nC_notify-Progs Aborting task (plugin: remember_rejected)
2016-05-10 04:10 WARNING  debug_db_sess nC_movie-HUN    Transaction 0xB11EB9F0 closed ('flexget.utils.sqlalchemy_utils', 143, '__exit__', 'self.rollback()') (open time 37.9630770683)
2016-05-10 04:10 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task_queue.py", line 47, in run
    self.current_task.execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 70, in wrapper
    return func(self, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 583, in execute
    self._execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 515, in _execute
    last_hash = session.query(TaskConfigHash).filter(TaskConfigHash.task == self.name).first()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2634, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2457, in __getitem__
    return list(res)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT feed_config_hash.name AS feed_config_hash_name, feed_config_hash.id AS feed_config_hash_id, feed_config_hash.hash AS feed_config_hash_hash \nFROM feed_config_hash \nWHERE feed_config_hash.name = ?\n LIMIT ? OFFSET ?'] [parameters: ('nC_movie-HUN', 1, 0)]
```

Do someone know anything new about this? Thank you!

I've got a new one with version 2.0.28. I know, that the movie queue is deprecated, I'm just cleaning it up.

``` logtalk
$ flexget movie-queue del imdb_id=tt1431045
There is a FlexGet process already running for this config, sending execution there.
WARNING!: movie_queue plugin is deprecated. Please switch to using movie_list
2016-05-22 13:47 WARNING  debug_db_sess                 Sessions from 2 threads! Transaction 0xB117B930 opened ('flexget.task', 57, 'config_changed', 'task_hash.delete()') Already open one(s): {<sqlalchemy.orm.session.SessionTransaction object at 0xb0f3aa70>: (1463917592.438065, <sqlalchemy.pool._ConnectionFairy object at 0xb0f3a210>, 'flexget.plugins.filter.series', 1618, 'on_task_start', 'session.query(SeriesTask).filter(SeriesTask.name == task.name).delete()')}
2016-05-22 13:47 WARNING  debug_db_sess                 Transaction 0xB117B930 closed ('flexget.utils.sqlalchemy_utils', 143, '__exit__', 'self.rollback()') (open time 10.5394048691)
Traceback (most recent call last):
  File "/usr/local/bin/flexget", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/flexget/__init__.py", line 42, in main
    manager.start()
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 293, in start
    client.handle_cli(self.args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 196, in __call__
    return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 71, in syncreq
    return conn.sync_request(handler, oid, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 441, in sync_request
    raise obj
rpyc.core.vinegar/sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked

========= Remote Traceback (1) =========
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 305, in _dispatch_request
    res = self._HANDLERS[handler](self, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 535, in _handle_call
    return self._local_objects[oid](*args, **dict(kwargs))
  File "/usr/local/lib/python2.7/dist-packages/flexget/ipc.py", line 80, in exposed_handle_cli
    self.manager.handle_cli(options)
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 337, in handle_cli
    options.cli_command_callback(self, command_options)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/cli/movie_queue.py", line 30, in do_cli
    manager.config_changed()
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 620, in config_changed
    config_changed()
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 34, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 57, in config_changed
    task_hash.delete()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3073, in delete
    delete_op.exec_()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_
    self._do_exec()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec
    mapper=self.mapper)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1034, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'DELETE FROM feed_config_hash']
```

is there a `config-lock` file in your dir when you run this? 

Yes, there is:

```
$ cat .flexget/.config-lock
PID: 11069
password: PWD
port: 45933
```

well try to remove the file and see if this happens again. a multitude of things can cause lock file to persist.

Is it possible in daemon mode? If I start the daemon, it will create that config-lock file. I think is not the same as the database lock..
I've removed .config-lock, and it seems to be not recreated, no error message is displayed, the daemon is running properly... what else can I check?

man, i apologize. I had the db lock file in mind with that whole comment...

Never mind! :) BTW, I've never seen that file - but I've an idea, I could monitor that file from crontab, eg. every one minute, I check if it exists - it must remain there for longer time, if it crashes Flexget!

I got one again with v2.0.42 with Python 2.7.9:

``` logtalk
2016-06-14 04:33 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB1203230 closed ('flexget.utils.sqlalchemy_ut
ils', 141, '__exit__', 'self.commit()') (open time 42.2306799889)
2016-06-14 04:33 WARNING  debug_db_sess nC_notify-Progs Transaction 0xB3C64BB0 closed ('flexget.utils.sqlalchemy_ut
ils', 143, '__exit__', 'self.rollback()') (open time 18.7738928795)
2016-06-14 04:33 CRITICAL task          nC_notify-Progs BUG: Unhandled error in plugin remember_rejected: (sqlite3.
OperationalError) database is locked [SQL: u'SELECT remember_rejected_feeds.id AS remember_rejected_feeds_id \nFROM
 remember_rejected_feeds \nWHERE remember_rejected_feeds.name = ?\n LIMIT ? OFFSET ?'] [parameters: ('nC_notify-Pro
gs', 1, 0)]
```

Is this still happening?

Yes, it still happening:

```
2016-10-16 04:08 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xAFEBC6F0 closed ('flexget.utils.sqlalchemy_utils', 142, '__exit__', 'self.commit()') (open time 58.0788650513)
2016-10-16 04:09 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xB42E32F0 closed ('flexget.utils.sqlalchemy_utils', 142, '__exit__', 'self.commit()') (open time 19.7970759869)
2016-10-16 04:09 WARNING  apscheduler.scheduler                 Execution of job "* (trigger: interval[0:16:00], next run at: 2016-10-16 04:08:46 CEST)" skipped: maximum number of running instances reached (1)
2016-10-16 04:09 WARNING  debug_db_sess nC_auto-HUN     Transaction 0xAFCF1DF0 closed ('flexget.utils.sqlalchemy_utils', 144, '__exit__', 'self.rollback()') (open time 12.4742498398)
2016-10-16 04:09 CRITICAL task          nC_auto-HUN     BUG: Unhandled error in plugin series: (sqlite3.OperationalError) database is locked [SQL: u'SELECT series.name AS series_name, series.name_lower AS series_name_lower, series.id AS series_id, series.identified_by AS series_identified_by, series.begin_episode_id AS series_begin_episode_id \nFROM series \nWHERE series.name_lower = ?\n LIMIT ? OFFSET ?'] [parameters: (u'billions', 1, 0)]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 477, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/series.py", line 1155, in on_task_metainfo
    self.parse_series(task.entries, series_name, series_config)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/series.py", line 1246, in parse_series
    series = session.query(Series).filter(Series.name == series_name).first()  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2695, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2487, in __getitem__
    return list(res)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2795, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2818, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 945, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1393, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 462, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT series.name AS series_name, series.name_lower AS series_name_lower, series.id AS series_id, series.identified_by AS series_identified_by, series.begin_episode_id AS series_begin_episode_id \nFROM series \nWHERE series.name_lower = ?\n LIMIT ? OFFSET ?'] [parameters: (u'billions', 1, 0)]
```

Guys any plans to fix this issue? I've had this on multiple new flexget versions over the last month. Currently using flexget 2.10.110 and Python 3.6. Log attached. Cheers

[crash_report.2017.11.18.012614070941.log](https://github.com/Flexget/Flexget/files/1484734/crash_report.2017.11.18.012614070941.log)

We don't support Python 3.6
i'm seeing this when i enable trakt_lookup. i posted a few weeks ago ([in the wrong place](https://discuss.flexget.com/t/trakt-lookup-crash/3934), sorry). 

ubuntu server 14.04 / python 2.7.14 / flexGet 2.11.13 

i'm also using the IRC addon so its hard to reproduce.

UPDATE: i restarted with --debug-db-sessions and a 10min loop to count how many crash files. 7 iterations of smooth sailing ... then 32 ... 84 ... 112. i had to be excused from the dinner table to sort it :) i saved all the logs & crash files, and restarted it without trakt again. 

would this be of any help ? (or just a massive test of my sed skills that doesn't help ?) 
This is still happening, currently running python 2.7.15rc1 and flexget 2.13.18 in daemon mode, but have Python 3.6 and 3.5 and it is the same.

What help do you need @cvium? Cheers.

[crash_report.2018.05.16.055139926352.log](https://github.com/Flexget/Flexget/files/2009645/crash_report.2018.05.16.055139926352.log)
[crash_report.2018.05.16.055150261389.log](https://github.com/Flexget/Flexget/files/2009646/crash_report.2018.05.16.055150261389.log)
[crash_report.2018.05.16.055200315470.log](https://github.com/Flexget/Flexget/files/2009647/crash_report.2018.05.16.055200315470.log)



I need the minimum amount of steps required to reproduce it consistently.
@cvium well I can tell you I'm running flexget as a daemon and this happens only happens when a file is found on IRC with an IRC task and a trakt or tvdb lookup is attempted - no problem with RSS inputs.

Attached is my flexget log.

[flexget.log](https://github.com/Flexget/Flexget/files/2011535/flexget.log)
that is how im seeing this too. irc + trakt. --  this block specifically
```
trakt_lookup:
  username: zosky
  account: zosky
if:
  - trakt_watched: reject

```
it is working. ... just not writing trakt meta to the db ? it is writing ~50 crash files per hr. i turning the other cheek with cron
`    @hourly	find ~/.flexget/ -name "crash_report*" -delete`

will more logs help ? i can turn on debug 
Debug log might be helpful.
disabled the cron job and restarted daemon with debug  -- will have a look in the morning
Okay here's a debug log of a crash, I have removed various sensitive data.

```
2018-05-18 17:02 DEBUG    irc                           Result for rule var: freeleech=false
2018-05-18 17:02 DEBUG    irc                           Processing rule setregex
2018-05-18 17:02 DEBUG    irc                           Processing rule varreplace
2018-05-18 17:02 DEBUG    irc                           varreplace: irc_torrentname=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb
2018-05-18 17:02 DEBUG    irc                           Processing rule var
2018-05-18 17:02 DEBUG    irc                           Result for rule var: torrentUrl=https://www.iptorrents.com/download.php/2833001/Greys%20Anatomy%20S14E24%20All%20of%20Me%20720p%20AMZN%20WEB-DL%20DDP5%201%20H%20264-NTb.torrent?torrent_pass=
2018-05-18 17:02 DEBUG    irc                           Entry after processing: {u'irc_torrenturl': u'https://www.iptorrents.com/download.php/2833001/Greys%20Anatomy%20S14E24%20All%20of%20Me%20720p%20AMZN%20WEB-DL%20DDP5%201%20H%20264-NTb.torrent?torrent_pass=', u'original_url': u'https://www.iptorrents.com/download.php/2833001/Greys%20Anatomy%20S14E24%20All%20of%20Me%20720p%20AMZN%20WEB-DL%20DDP5%201%20H%20264-NTb.torrent?torrent_pass=', u'url': u'https://www.iptorrents.com/download.php/2833001/Greys%20Anatomy%20S14E24%20All%20of%20Me%20720p%20AMZN%20WEB-DL%20DDP5%201%20H%20264-NTb.torrent?torrent_pass=', u'irc_$baseurl': u'www.iptorrents.com', u'title': u'Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb', u'irc_torrentname': u'Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb', u'irc_freeleech': u'false', 'irc_raw_message': u'[TV/Web-DL] Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb - https://www.iptorrents.com/details.php?id=2833001 - 1.3 GB', u'irc_category': u'TV/Web-DL', u'irc_$torrentid': u'2833001', u'irc_torrentsize': u'1.3 GB'}
2018-05-18 17:02 VERBOSE  irc                           IRC message in #ipt.announce2 generated an entry: <Entry(title=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,state=undecided)>
2018-05-18 17:02 DEBUG    irc                           Entry: <Entry(title=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,state=undecided)>
2018-05-18 17:02 DEBUG    irc                           Injecting 1 entries into task "irc-tv-dl"
2018-05-18 17:02 DEBUG    manager       irc-tv-dl       Not running db cleanup, last run 2018-05-16 10:56:44
2018-05-18 17:02 DEBUG    task          irc-tv-dl       executing irc-tv-dl
2018-05-18 17:02 DEBUG    task          irc-tv-dl       Disabling input phase
2018-05-18 17:02 DEBUG    template      irc-tv-dl       Merging template global into task irc-tv-dl
2018-05-18 17:02 DEBUG    template      irc-tv-dl       Merging template tv-settings into task irc-tv-dl
2018-05-18 17:02 DEBUG    include       irc-tv-dl       Merging /home/frank/.flexget/reject.yml into task irc-tv-dl
2018-05-18 17:02 DEBUG    input_cache   irc-tv-dl       cache name: trakt_list_e216e7069b8e42547fd4d1b6cde3e0c1 (has: trakt_list_e216e7069b8e42547fd4d1b6cde3e0c1, rss_30318af0c9ab32613fc970cbfc71424c, rss_40477f06f4895eb02e8e89ff8b264d1c)
2018-05-18 17:02 VERBOSE  input_cache   irc-tv-dl       Restored 54 entries from cache
2018-05-18 17:02 DEBUG    parser_internal irc-tv-dl       Parsing series: `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb` kwargs: {'name': None}
2018-05-18 17:02 DEBUG    parser_internal irc-tv-dl       Parsing result: <SeriesParser(data=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,name=Greys Anatomy,id=(14, 24),season=14,season_pack=None,episode=24,quality=720p webdl h264 dd+5.1,proper=0,status=OK)> (in 0.968000000057 ms)
2018-05-18 17:02 DEBUG    parser_internal irc-tv-dl       Parsing series: `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb` kwargs: {'identified_by': u'ep', u'date_regexps': [], 'strict_name': False, 'name': u"Grey's Anatomy (2005)", 'prefer_specials': None, 'special_ids': [], 'alternate_names': [], u'sequence_regexps': [], 'date_dayfirst': None, u'id_regexps': [], 'assume_special': None, 'name_regexps': [], 'date_yearfirst': None, 'allow_groups': [], u'ep_regexps': []}
2018-05-18 17:02 DEBUG    parser_internal irc-tv-dl       Parsing result: <SeriesParser(data=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,name=Grey's Anatomy (2005),id=(14, 24),season=14,season_pack=None,episode=24,quality=720p webdl h264 dd+5.1,proper=0,status=OK)> (in 0.95900000008 ms)
2018-05-18 17:02 DEBUG    series        irc-tv-dl       `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb` detected as `<SeriesParseResult(data=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,name=Grey's Anatomy (2005),id=(14, 24),season=14,season_pack=None,episode=24,quality=720p webdl h264 dd+5.1,proper=0,special=False,status=OK)>`, field: `title`
2018-05-18 17:02 DEBUG    series        irc-tv-dl       series on_task_metainfo took 0.01156 to parse
2018-05-18 17:02 DEBUG    series        irc-tv-dl       adding release `<SeriesParseResult(data=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb,name=Grey's Anatomy (2005),id=(14, 24),season=14,season_pack=None,episode=24,quality=720p webdl h264 dd+5.1,proper=0,special=False,status=OK)>`
2018-05-18 17:02 DEBUG    series        irc-tv-dl       -> added `<Release(id=None,quality=720p webdl h264 dd+5.1,downloaded=None,proper_count=0,title=Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb)>`
2018-05-18 17:02 DEBUG    series        irc-tv-dl       start with entities: [u'Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb']
2018-05-18 17:02 DEBUG    series        irc-tv-dl       current entities: [u'Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb']
2018-05-18 17:02 DEBUG    series        irc-tv-dl       quality req: 720p-1080p webrip+
2018-05-18 17:02 DEBUG    series        irc-tv-dl       -------------------- process_propers -->
2018-05-18 17:02 DEBUG    series        irc-tv-dl       propers - downloaded qualities: {}
2018-05-18 17:02 DEBUG    series        irc-tv-dl       continuing w. entities: [u'Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb']
2018-05-18 17:02 DEBUG    series        irc-tv-dl       best entity is: `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb`
2018-05-18 17:02 DEBUG    series        irc-tv-dl       -------------------- tracking -->
2018-05-18 17:02 DEBUG    series        irc-tv-dl       latest episode for series <Series(id=194,name=Grey's Anatomy (2005))>, with downloaded set to True and season set to None
2018-05-18 17:02 DEBUG    series        irc-tv-dl       no season packs found for series `Grey's Anatomy (2005)` with parameters season: None, downloaded: True
2018-05-18 17:02 DEBUG    series        irc-tv-dl       latest download: <Episode(id=4092,identifier=S14E23,season=14,number=23)>
2018-05-18 17:02 DEBUG    series        irc-tv-dl       current: <Episode(id=4199,identifier=S14E24,season=14,number=24)>
2018-05-18 17:02 DEBUG    series        irc-tv-dl       timeframe: 18 hours
2018-05-18 17:02 DEBUG    series        irc-tv-dl       timeframe: 18:00:00, first_seen: 2018-05-18 00:14:35.148305, expires: 2018-05-18 18:14:35.148305
2018-05-18 17:02 INFO     series        irc-tv-dl       `Grey's Anatomy (2005)`: timeframe waiting for 01h:11min. Currently best is `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb`.
2018-05-18 17:02 WARNING  backlog       irc-tv-dl       No input snapshot available for `Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb`, using current state
2018-05-18 17:02 DEBUG    backlog       irc-tv-dl       Saving Greys Anatomy S14E24 All of Me 720p AMZN WEB-DL DDP5 1 H 264-NTb
2018-05-18 17:02 DEBUG    api_trakt     irc-tv-dl       Episode 14 24 not found in cache, looking up from trakt.
2018-05-18 17:02 DEBUG    utils.requests irc-tv-dl       Fetching URL https://api.trakt.tv/shows/1407/seasons/14/episodes/24/?extended=full with args () and kwargs {'allow_redirects': True, u'timeout': 30}
2018-05-18 17:03 DEBUG    irc_bot                       Executing scheduled command keepalive
2018-05-18 17:03 DEBUG    irc_bot                       SENT: PING irc.iptorrents.com
2018-05-18 17:03 DEBUG    irc_bot                       Queueing command "keepalive" to execute in 120 second(s)
2018-05-18 17:03 DEBUG    irc_bot                       Received: [command: PONG, prefix: irc.iptorrents.com, tags: None, arguments: [irc.iptorrents.com, irc.iptorrents.com], from_nick: None, raw: :irc.iptorrents.com PONG irc.iptorrents.com :irc.iptorrents.com]
2018-05-18 17:03 ERROR    lazy_lookup   irc-tv-dl       Unhandled error in lazy lookup plugin
Traceback (most recent call last):
  File "/home/frank/flexget/local/lib/python2.7/site-packages/flexget/utils/lazy_dict.py", line 37, in __getitem__
    func(self.store)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/flexget/plugins/metainfo/trakt_lookup.py", line 240, in lazy_episode_lookup
    entry.update_using_map(self.episode_map, episode)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/flexget/utils/sqlalchemy_utils.py", line 144, in __exit__
    self.commit()
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 943, in commit
    self.transaction.commit()
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 467, in commit
    self._prepare_impl()
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 447, in _prepare_impl
    self.session.flush()
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2254, in flush
    self._flush(objects)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2380, in _flush
    transaction.rollback(_capture_exception=True)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2344, in _flush
    flush_context.execute()
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 391, in execute
    rec.execute(self)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 556, in execute
    uow
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 181, in save_obj
    mapper, table, insert)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 830, in _emit_insert_statements
    execute(statement, multiparams)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "/home/frank/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 507, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_episodes (id, tvdb_id, imdb_id, tmdb_id, tvrage_id, title, season, number, number_abs, overview, first_aired, updated_at, cached_at, series_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: (2945582, 6628121, None, 1481988, 0, u'All of Me', 14, 24, None, u'Meredith Grey and the team of doctors at Grey Sloan Memorial are faced with life-or-death decisions on a daily basis. They seek comfort from one another, and, at times, more than just friendship. Together they discover that neither medicine nor relationships can be defined in black and white.', '2018-05-18 00:00:00.000000', '2018-05-18 20:59:54.000000', '2018-05-18 17:02:52.062493', 1407)] (Background on this error at: http://sqlalche.me/e/e3q8)

```
And here's another from hours earlier for the same episode (different file and different IRC network).
[crash_report.2018.05.18.055340814688.log](https://github.com/Flexget/Flexget/files/2018705/crash_report.2018.05.18.055340814688.log)

Ok guys, this defect is 2 years old now, anything else we can do to help diagnose this?
@frankyw You can try installing from the git branch `refactor_trakt_api` and see if it helps
@cvium ok here's the new error.


 14:42 DEBUG    parser_internal irc-tv-dl       Parsing series: `Empire.2015.S04E18.720p.HDTV.x264-CRAVERS` kwargs: {'name': None}
2018-05-25 14:42 DEBUG    parser_internal irc-tv-dl       Parsing result: <SeriesParser(data=Empire.2015.S04E18.720p.HDTV.x264-CRAVERS,name=Empire 2015,id=(4, 18),season=4,season_pack=None,episode=18,quality=720p hdtv h264,proper=0,status=OK)> (in 0.467999999984 ms)
2018-05-25 14:42 DEBUG    parser_internal irc-tv-dl       Parsing series: `Empire.2015.S04E18.720p.HDTV.x264-CRAVERS` kwargs: {'identified_by': u'ep', u'date_regexps': [], 'strict_name': False, 'name': u'Empire (2015)', 'prefer_specials': None, 'special_ids': [], 'alternate_names': [], u'sequence_regexps': [], 'date_dayfirst': None, u'id_regexps': [], 'assume_special': None, 'name_regexps': [], 'date_yearfirst': None, 'allow_groups': [], u'ep_regexps': []}
2018-05-25 14:42 DEBUG    parser_internal irc-tv-dl       Parsing result: <SeriesParser(data=Empire.2015.S04E18.720p.HDTV.x264-CRAVERS,name=Empire (2015),id=(4, 18),season=4,season_pack=None,episode=18,quality=720p hdtv h264,proper=0,status=OK)> (in 0.325000000004 ms)
2018-05-25 14:42 DEBUG    series        irc-tv-dl       `Empire.2015.S04E18.720p.HDTV.x264-CRAVERS` detected as `<SeriesParseResult(data=Empire.2015.S04E18.720p.HDTV.x264-CRAVERS,name=Empire (2015),id=(4, 18),season=4,season_pack=None,episode=18,quality=720p hdtv h264,proper=0,special=False,status=OK)>`, field: `title`
2018-05-25 14:42 DEBUG    series        irc-tv-dl       series on_task_metainfo took 0.010585 to parse
2018-05-25 14:42 CRITICAL task          irc-tv-dl       BUG: Unhandled error in plugin series: expected string or buffer
Traceback (most recent call last):
  File "/home/frank/flexget-dev/flexget/task.py", line 486, in __run_plugin
    return method(*args, **kwargs)
  File "/home/frank/flexget-dev/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/home/frank/flexget-dev/flexget/plugins/filter/series.py", line 1710, in on_task_filter
    quality=entry.get('quality'))
  File "/home/frank/flexget-dev/flexget/plugins/filter/series.py", line 985, in store_parser
    filter(table.quality == quality). \
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/ext/hybrid.py", line 867, in __get__
    return self._expr_comparator(owner)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/ext/hybrid.py", line 1066, in expr_comparator
    owner, self.__name__, self, comparator(owner),
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/ext/hybrid.py", line 1055, in _expr
    return ExprComparator(cls, expr(cls), self)
  File "/home/frank/flexget-dev/flexget/utils/database.py", line 182, in getter
    return qualities.Quality(getattr(self, text_attr))
  File "/home/frank/flexget-dev/flexget/utils/qualities.py", line 211, in __init__
    self.parse(text)
  File "/home/frank/flexget-dev/flexget/utils/qualities.py", line 225, in parse
    self.resolution = self._find_best(_resolutions, _UNKNOWNS['resolution'], False)
  File "/home/frank/flexget-dev/flexget/utils/qualities.py", line 241, in _find_best
    match = item.matches(search_in)
  File "/home/frank/flexget-dev/flexget/utils/qualities.py", line 45, in matches
    match = self.regexp.search(text)
TypeError: expected string or buffer
@frankyw that's a bug that was fixed fairly recently. I've pulled the latest changes from develop into the branch. Update from the branch and try again.
@cvium Ok I've done as you suggested and it doesn't seem to be good news I'm afraid, I am still seeing quite a lot of crashes, all to do with database locking with trakt. Here is one such log. Please let me know if I can try anything else. Cheers.

```
2018-05-27 22:36 DEBUG    irc                           Processing rule varreplace
2018-05-27 22:36 DEBUG    irc                           varreplace: irc_torrentname=Deception 2018 S01E13 AAC MP4-Mobile
2018-05-27 22:36 DEBUG    irc                           Processing rule var
2018-05-27 22:36 DEBUG    irc                           Result for rule var: torrentUrl=https://www.iptorrents.com/download.php/2845951/Deception%202018%20S01E13%20AAC%20MP4-Mobile.torrent?torrent_pass=
2018-05-27 22:36 DEBUG    irc                           Entry after processing: {u'irc_torrenturl': u'https://www.iptorrents.com/download.php/2845951/Deception%202018%20S01E13%20AAC%20MP4-Mobile.torrent?torrent_pass=', u'original_url': u'https://www.iptorrents.com/download.php/2845951/Deception%202018%20S01E13%20AAC%20MP4-Mobile.torrent?torrent_pass=', u'url': u'https://www.iptorrents.com/download.php/2845951/Deception%202018%20S01E13%20AAC%20MP4-Mobile.torrent?torrent_pass=', u'irc_$baseurl': u'www.iptorrents.com', u'title': u'Deception 2018 S01E13 AAC MP4-Mobile', u'irc_torrentname': u'Deception 2018 S01E13 AAC MP4-Mobile', u'irc_freeleech': u'false', 'irc_raw_message': u'[TV/Mobile] Deception 2018 S01E13 AAC MP4-Mobile - https://www.iptorrents.com/details.php?id=2845951 - 185.3 MB', u'irc_category': u'TV/Mobile', u'irc_$torrentid': u'2845951', u'irc_torrentsize': u'185.3 MB'}
2018-05-27 22:36 VERBOSE  irc                           IRC message in #ipt.announce2 generated an entry: <Entry(title=Deception 2018 S01E13 AAC MP4-Mobile,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Entry: <Entry(title=Deception 2018 S01E13 AAC MP4-Mobile,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Entry "Deception 2018 S01E13 AAC MP4-Mobile" did not match any task regexp.
2018-05-27 22:36 DEBUG    irc_bot                       Received: [command: PRIVMSG, prefix: FunTimes!FunTimes@netadmin.iptorrents.com, tags: None, arguments: [#ipt.announce2, [TV/x265] UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta - https://www.iptorrents.com/details.php?id=2845952 - 2.7 GB], from_nick: FunTimes, raw: :FunTimes!FunTimes@netadmin.iptorrents.com PRIVMSG #ipt.announce2 :[TV/x265] UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta - https://www.iptorrents.com/details.php?id=2845952 - 2.7 GB]
2018-05-27 22:36 DEBUG    irc_bot                       Queueing command "process_message" to execute in 1 second(s)
2018-05-27 22:36 DEBUG    irc_bot                       Received: [command: PRIVMSG, prefix: FunTimes!FunTimes@netadmin.iptorrents.com, tags: None, arguments: [#ipt.announce2, [TV/x264] Killing Eve S01E08 CONVERT 720p WEB h264-TBS - https://www.iptorrents.com/details.php?id=2845953 - 749.7 MB], from_nick: FunTimes, raw: :FunTimes!FunTimes@netadmin.iptorrents.com PRIVMSG #ipt.announce2 :[TV/x264] Killing Eve S01E08 CONVERT 720p WEB h264-TBS - https://www.iptorrents.com/details.php?id=2845953 - 749.7 MB]
2018-05-27 22:36 DEBUG    irc_bot                       Executing scheduled command process_message
2018-05-27 22:36 DEBUG    irc                           Received line(s): [TV/x265] UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta - https://www.iptorrents.com/details.php?id=2845952 - 2.7 GB
[TV/x264] Killing Eve S01E08 CONVERT 720p WEB h264-TBS - https://www.iptorrents.com/details.php?id=2845953 - 749.7 MB
2018-05-27 22:36 DEBUG    irc                           Using pattern ^\[([^\]]*)](.*)-\s+https?\:\/\/([^\/]+).*[&\?]id=(\d+)\s*-(.*) to parse message vars
2018-05-27 22:36 DEBUG    irc                           Found: {u'irc_$torrentid': u'2845952', u'irc_$baseurl': u'www.iptorrents.com', u'irc_torrentsize': u'2.7 GB', u'irc_torrentname': u'UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta', u'irc_category': u'TV/x265'}
2018-05-27 22:36 DEBUG    irc                           Using pattern ^\[([^\]]*)](.*)-\s+https?\:\/\/([^\/]+).*[&\?]id=(\d+)\s*-(.*) to parse message vars
2018-05-27 22:36 DEBUG    irc                           Found: {u'irc_$torrentid': u'2845953', u'irc_$baseurl': u'www.iptorrents.com', u'irc_torrentsize': u'749.7 MB', u'irc_torrentname': u'Killing Eve S01E08 CONVERT 720p WEB h264-TBS', u'irc_category': u'TV/x264'}
2018-05-27 22:36 DEBUG    irc                           Processing rule var
2018-05-27 22:36 DEBUG    irc                           Result for rule var: freeleech=false
2018-05-27 22:36 DEBUG    irc                           Processing rule setregex
2018-05-27 22:36 DEBUG    irc                           Processing rule varreplace
2018-05-27 22:36 DEBUG    irc                           varreplace: irc_torrentname=UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta
2018-05-27 22:36 DEBUG    irc                           Processing rule var
2018-05-27 22:36 DEBUG    irc                           Result for rule var: torrentUrl=https://www.iptorrents.com/download.php/2845952/UFC%20Fight%20Night%20130%20Prelims%20720p%20HEVC%20x265-MeGusta.torrent?torrent_pass=
2018-05-27 22:36 DEBUG    irc                           Entry after processing: {u'irc_torrenturl': u'https://www.iptorrents.com/download.php/2845952/UFC%20Fight%20Night%20130%20Prelims%20720p%20HEVC%20x265-MeGusta.torrent?torrent_pass=', u'original_url': u'https://www.iptorrents.com/download.php/2845952/UFC%20Fight%20Night%20130%20Prelims%20720p%20HEVC%20x265-MeGusta.torrent?torrent_pass=', u'url': u'https://www.iptorrents.com/download.php/2845952/UFC%20Fight%20Night%20130%20Prelims%20720p%20HEVC%20x265-MeGusta.torrent?torrent_pass=', u'irc_$baseurl': u'www.iptorrents.com', u'title': u'UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta', u'irc_torrentname': u'UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta', u'irc_freeleech': u'false', 'irc_raw_message': u'[TV/x265] UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta - https://www.iptorrents.com/details.php?id=2845952 - 2.7 GB', u'irc_category': u'TV/x265', u'irc_$torrentid': u'2845952', u'irc_torrentsize': u'2.7 GB'}
2018-05-27 22:36 VERBOSE  irc                           IRC message in #ipt.announce2 generated an entry: <Entry(title=UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Entry: <Entry(title=UFC Fight Night 130 Prelims 720p HEVC x265-MeGusta,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Injecting 1 entries into task "irc-tv-dl"
2018-05-27 22:36 DEBUG    irc                           Processing rule var
2018-05-27 22:36 DEBUG    irc                           Result for rule var: freeleech=false
2018-05-27 22:36 DEBUG    irc                           Processing rule setregex
2018-05-27 22:36 DEBUG    irc                           Processing rule varreplace
2018-05-27 22:36 DEBUG    irc                           varreplace: irc_torrentname=Killing Eve S01E08 CONVERT 720p WEB h264-TBS
2018-05-27 22:36 DEBUG    irc                           Processing rule var
2018-05-27 22:36 DEBUG    irc                           Result for rule var: torrentUrl=https://www.iptorrents.com/download.php/2845953/Killing%20Eve%20S01E08%20CONVERT%20720p%20WEB%20h264-TBS.torrent?torrent_pass=
2018-05-27 22:36 DEBUG    irc                           Entry after processing: {u'irc_torrenturl': u'https://www.iptorrents.com/download.php/2845953/Killing%20Eve%20S01E08%20CONVERT%20720p%20WEB%20h264-TBS.torrent?torrent_pass=', u'original_url': u'https://www.iptorrents.com/download.php/2845953/Killing%20Eve%20S01E08%20CONVERT%20720p%20WEB%20h264-TBS.torrent?torrent_pass=', u'url': u'https://www.iptorrents.com/download.php/2845953/Killing%20Eve%20S01E08%20CONVERT%20720p%20WEB%20h264-TBS.torrent?torrent_pass=', u'irc_$baseurl': u'www.iptorrents.com', u'title': u'Killing Eve S01E08 CONVERT 720p WEB h264-TBS', u'irc_torrentname': u'Killing Eve S01E08 CONVERT 720p WEB h264-TBS', u'irc_freeleech': u'false', 'irc_raw_message': u'[TV/x264] Killing Eve S01E08 CONVERT 720p WEB h264-TBS - https://www.iptorrents.com/details.php?id=2845953 - 749.7 MB', u'irc_category': u'TV/x264', u'irc_$torrentid': u'2845953', u'irc_torrentsize': u'749.7 MB'}
2018-05-27 22:36 VERBOSE  irc                           IRC message in #ipt.announce2 generated an entry: <Entry(title=Killing Eve S01E08 CONVERT 720p WEB h264-TBS,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Entry: <Entry(title=Killing Eve S01E08 CONVERT 720p WEB h264-TBS,state=undecided)>
2018-05-27 22:36 DEBUG    irc                           Injecting 1 entries into task "irc-tv-dl"
2018-05-27 22:36 ERROR    lazy_lookup   irc-tv-dl       Unhandled error in lazy lookup plugin: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_episodes (id, tvdb_id, imdb_id, tmdb_id, tvrage_id, title, season, number, number_abs, overview, first_aired, updated_at, cached_at, series_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: (2919716, 6670455, u'tt7081320', 1480383, 0, u"God, I'm Tired", 1, 8, None, u"Villanelle's mission is proving anything but straightforward, forcing her to take drastic measures. Meanwhile, Eve makes a shocking discovery, which leads her right to Villanelle and an electrifying confrontation from which neither will emerge unscathed.", '2018-05-28 00:00:00.000000', '2018-05-28 01:17:13.000000', '2018-05-27 22:36:39.202462', 126924)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-05-27 22:36 CRITICAL manager       irc-tv-dl       An unexpected crash has occurred. Writing crash report to /home/frank/.flexget/crash_report.2018.05.27.223649233412.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.21.dev
2018-05-27 22:36 DEBUG    manager       irc-tv-dl       Traceback:
Traceback (most recent call last):
  File "/home/frank/flexget-dev/flexget/utils/lazy_dict.py", line 37, in __getitem__
    func(self.store)
  File "/home/frank/flexget-dev/flexget/plugins/metainfo/trakt_lookup.py", line 32, in __call__
    result = self.lookup_function(entry, session)
  File "/home/frank/flexget-dev/flexget/plugins/metainfo/trakt_lookup.py", line 288, in _get_episode
    return show.get_episode(entry['series_season'], entry['series_episode'], session)
  File "/home/frank/flexget-dev/flexget/plugins/internal/api_trakt.py", line 646, in get_episode
    session.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 943, in commit
    self.transaction.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 467, in commit
    self._prepare_impl()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 447, in _prepare_impl
    self.session.flush()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2254, in flush
    self._flush(objects)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2380, in _flush
    transaction.rollback(_capture_exception=True)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2344, in _flush
    flush_context.execute()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 391, in execute
    rec.execute(self)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 556, in execute
    uow
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 181, in save_obj
    mapper, table, insert)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 830, in _emit_insert_statements
    execute(statement, multiparams)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 507, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_episodes (id, tvdb_id, imdb_id, tmdb_id, tvrage_id, title, season, number, number_abs, overview, first_aired, updated_at, cached_at, series_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: (2919716, 6670455, u'tt7081320', 1480383, 0, u"God, I'm Tired", 1, 8, None, u"Villanelle's mission is proving anything but straightforward, forcing her to take drastic measures. Meanwhile, Eve makes a shocking discovery, which leads her right to Villanelle and an electrifying confrontation from which neither will emerge unscathed.", '2018-05-28 00:00:00.000000', '2018-05-28 01:17:13.000000', '2018-05-27 22:36:39.202462', 126924)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-05-27 22:36 DEBUG    utils.requests irc-tv-dl       GETing URL https://api.trakt.tv/shows/126924/people with args () and kwargs {'allow_redirects': True, 'params': {u'extended': u'full'}, u'timeout': 30}
2018-05-27 22:36 ERROR    lazy_lookup   irc-tv-dl       Unhandled error in lazy lookup plugin: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_actors (id, name, slug, tmdb, imdb, biography, birthday, death, homepage) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: ((1121041, u'Sean Delaney', u'sean-delaney', 2021417, None, u'', None, None, None), (473194, u'Jodie Comer', u'jodie-comer', 1388593, u'nm3069650', u'Jodie Comer is a British actress who rose to prominence in 2011 when she played the role of Sharna in BBC One drama Justice. She also played Chloe in BAFTA-nominated British comedy-drama series My Mad Fat Diary (2013-2014).', None, None, None), (414091, u'Fiona Shaw', u'fiona-shaw', 10981, u'nm0789716', u'From Wikipedia, the free encyclopedia.\n\nFiona Shaw, Honorary CBE (born 10 July 1958) is an Irish actress and theatre director. Although to interna ... (171 characters truncated) ... an honorary CBE in 2001.\n\nDescription above from the Wikipedia article Fiona Shaw, licensed under CC-BY-SA, full list of contributors on Wikipedia.', '1958-07-10', None, None), (9838, u'Darren Boyd', u'darren-boyd', 17123, u'nm0101740', u'', '1971-01-30', None, None), (653745, u'Kirby Howell-Baptiste', u'kirby-howell-baptiste', 1532312, u'nm4624730', u'', None, None, None), (417747, u'Sandra Oh', u'sandra-oh', 25540, u'nm0644897', u"From Wikipedia, the free encyclopedia.\n\nSandra Oh (born July 20, 1971) is a Canadian actress. She is primarily known for portraying the role of Dr ... (106 characters truncated) ... d. She also played notable roles in the feature films Under the Tuscan Sun and Sideways, and had a supporting role on the HBO original series Arli$$.", '1971-07-20', None, u'http://www.sandraoh.com/'), (412122, u'Kim Bodnia', u'kim-bodnia', 3398, u'nm0091035', u"\u200bKim Bodnia (f\xf8dt 12. april 1965) er en dansk skuespiller. Han har medvirket i flere af de danske filmsuccesser fra 1990'erne bl.a. Nattevag ... (180 characters truncated) ... ar med skuespilleren Lotte Merete Andersen, som han ogs\xe5 har en s\xf8n med og er nu gift med Rikke Louise Andersson som han tre b\xf8rn med.  \xa0", '1965-04-12', None, None), (186620, u'Owen McDonnell', u'owen-mcdonnell', 365333, u'nm1711652', u'', None, None, None))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-05-27 22:36 CRITICAL manager       irc-tv-dl       An unexpected crash has occurred. Writing crash report to /home/frank/.flexget/crash_report.2018.05.27.223659517782.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.21.dev
2018-05-27 22:36 DEBUG    manager       irc-tv-dl       Traceback:
Traceback (most recent call last):
  File "/home/frank/flexget-dev/flexget/utils/lazy_dict.py", line 37, in __getitem__
    func(self.store)
  File "/home/frank/flexget-dev/flexget/plugins/metainfo/trakt_lookup.py", line 36, in __call__
    entry.update_using_map(self.field_map, result)
  File "/home/frank/flexget-dev/flexget/utils/sqlalchemy_utils.py", line 144, in __exit__
    self.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 943, in commit
    self.transaction.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 467, in commit
    self._prepare_impl()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 447, in _prepare_impl
    self.session.flush()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2254, in flush
    self._flush(objects)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2380, in _flush
    transaction.rollback(_capture_exception=True)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2344, in _flush
    flush_context.execute()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 391, in execute
    rec.execute(self)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 556, in execute
    uow
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 181, in save_obj
    mapper, table, insert)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 830, in _emit_insert_statements
    execute(statement, multiparams)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1170, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 504, in do_executemany
    cursor.executemany(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_actors (id, name, slug, tmdb, imdb, biography, birthday, death, homepage) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: ((1121041, u'Sean Delaney', u'sean-delaney', 2021417, None, u'', None, None, None), (473194, u'Jodie Comer', u'jodie-comer', 1388593, u'nm3069650', u'Jodie Comer is a British actress who rose to prominence in 2011 when she played the role of Sharna in BBC One drama Justice. She also played Chloe in BAFTA-nominated British comedy-drama series My Mad Fat Diary (2013-2014).', None, None, None), (414091, u'Fiona Shaw', u'fiona-shaw', 10981, u'nm0789716', u'From Wikipedia, the free encyclopedia.\n\nFiona Shaw, Honorary CBE (born 10 July 1958) is an Irish actress and theatre director. Although to interna ... (171 characters truncated) ... an honorary CBE in 2001.\n\nDescription above from the Wikipedia article Fiona Shaw, licensed under CC-BY-SA, full list of contributors on Wikipedia.', '1958-07-10', None, None), (9838, u'Darren Boyd', u'darren-boyd', 17123, u'nm0101740', u'', '1971-01-30', None, None), (653745, u'Kirby Howell-Baptiste', u'kirby-howell-baptiste', 1532312, u'nm4624730', u'', None, None, None), (417747, u'Sandra Oh', u'sandra-oh', 25540, u'nm0644897', u"From Wikipedia, the free encyclopedia.\n\nSandra Oh (born July 20, 1971) is a Canadian actress. She is primarily known for portraying the role of Dr ... (106 characters truncated) ... d. She also played notable roles in the feature films Under the Tuscan Sun and Sideways, and had a supporting role on the HBO original series Arli$$.", '1971-07-20', None, u'http://www.sandraoh.com/'), (412122, u'Kim Bodnia', u'kim-bodnia', 3398, u'nm0091035', u"\u200bKim Bodnia (f\xf8dt 12. april 1965) er en dansk skuespiller. Han har medvirket i flere af de danske filmsuccesser fra 1990'erne bl.a. Nattevag ... (180 characters truncated) ... ar med skuespilleren Lotte Merete Andersen, som han ogs\xe5 har en s\xf8n med og er nu gift med Rikke Louise Andersson som han tre b\xf8rn med.  \xa0", '1965-04-12', None, None), (186620, u'Owen McDonnell', u'owen-mcdonnell', 365333, u'nm1711652', u'', None, None, None))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-05-27 22:36 DEBUG    utils.requests irc-tv-dl       GETing URL https://api.trakt.tv/shows/126924/translations with args () and kwargs {'allow_redirects': True, 'params': {u'extended': u'full'}, u'timeout': 30}
2018-05-27 22:37 DEBUG    irc_bot                       Received: [command: PING, prefix: None, tags: None, arguments: [irc.iptorrents.com], from_nick: None, raw: PING :irc.iptorrents.com]
2018-05-27 22:37 DEBUG    irc_bot                       SENT: PONG :irc.iptorrents.com
2018-05-27 22:37 ERROR    lazy_lookup   irc-tv-dl       Unhandled error in lazy lookup plugin: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_show_translations (language, overview, title, show_id) VALUES (?, ?, ?, ?)'] [parameters: (u'bg', u'\u0418\u0439\u0432 \u0435 \u043e\u0442\u0435\u0433\u0447\u0435\u043d\u0430 \u0438 \u0431\u0440\u0438\u043b\u044f\u043d\u0442\u043d\u0430 \u0441\u043 ... (3923 characters truncated) ... u0430\u043b\u043d\u043e\u0441\u0442, \u0432\u0438\u0441\u043e\u043a\u0438 \u0437\u0430\u043b\u043e\u0437\u0438 \u0438 \u0435\u043a\u0448\u044a\u043d.', u'\u0423\u0431\u0438\u0432\u0430\u0439\u043a\u0438 \u0418\u0439\u0432', 126924)] (Background on this error at: http://sqlalche.me/e/e3q8)
Traceback (most recent call last):
  File "/home/frank/flexget-dev/flexget/utils/lazy_dict.py", line 37, in __getitem__
    func(self.store)
  File "/home/frank/flexget-dev/flexget/plugins/metainfo/trakt_lookup.py", line 36, in __call__
    entry.update_using_map(self.field_map, result)
  File "/home/frank/flexget-dev/flexget/utils/sqlalchemy_utils.py", line 144, in __exit__
    self.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 943, in commit
    self.transaction.commit()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 467, in commit
    self._prepare_impl()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 447, in _prepare_impl
    self.session.flush()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2254, in flush
    self._flush(objects)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2380, in _flush
    transaction.rollback(_capture_exception=True)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2344, in _flush
    flush_context.execute()
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 391, in execute
    rec.execute(self)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 556, in execute
    uow
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 181, in save_obj
    mapper, table, insert)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 866, in _emit_insert_statements
    execute(statement, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "/home/frank/flexget-dev/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 507, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'INSERT INTO trakt_show_translations (language, overview, title, show_id) VALUES (?, ?, ?, ?)'] [parameters: (u'bg', u'\u0418\u0439\u0432 \u0435 \u043e\u0442\u0435\u0433\u0447\u0435\u043d\u0430 \u0438 \u0431\u0440\u0438\u043b\u044f\u043d\u0442\u043d\u0430 \u0441\u043 ... (3923 characters truncated) ... u0430\u043b\u043d\u043e\u0441\u0442, \u0432\u0438\u0441\u043e\u043a\u0438 \u0437\u0430\u043b\u043e\u0437\u0438 \u0438 \u0435\u043a\u0448\u044a\u043d.', u'\u0423\u0431\u0438\u0432\u0430\u0439\u043a\u0438 \u0418\u0439\u0432', 126924)] (Background on this error at: http://sqlalche.me/e/e3q8)

```
So the crashes are worse now?
@cvium well I guess worse in the sense there now seem to be multiple 'database locked' errors occurring together, but the frequency of crash files seems to be around the same.
I still can't reproduce it. If someone can send me their .sqlite db I can take a look.
@cvium I can send you my sqlite db, what's the best way to contact you?
Interestingly, I also have this same configuration running on a completely different server that I run for a friend of mind, his also crashes in a similar (database locked) yet different way:

2018-06-03 12:26 CRITICAL task          monitor-rss     BUG: Unhandled error in plugin configure_series: (sqlite3.OperationalError) database is locked [SQL: u'SELECT input_cache.id AS input_cache_id, input_cache.name AS input_cache_name, input_cache.hash AS input_cache_hash, input_cache.added AS input_cache_added \nFROM input_cache \nWHERE input_cache.name = ? AND input_cache.hash = ? AND input_cache.added > ?\n LIMIT ? OFFSET ?'] [parameters: ('trakt_list', '3df51d701f7fcc73456449b7fe0b6d7f', '2018-06-03 10:26:22.021600', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:26 CRITICAL manager       monitor-rss     An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.122632079654.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:26 WARNING  task          monitor-rss     Aborting task (plugin: configure_series)
2018-06-03 12:26 CRITICAL task          monitor-rss     BUG: Unhandled error in plugin status: (sqlite3.OperationalError) database is locked [SQL: u'SELECT status_task.task AS status_task_task, status_task.id AS status_task_id \nFROM status_task \nWHERE status_task.id = ?'] [parameters: (6,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:26 CRITICAL manager       monitor-rss     An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.122642124837.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:26 WARNING  task          monitor-rss     Aborting task (plugin: status)
2018-06-03 12:26 ERROR    task          monitor-rss     abort handlers aborted: 
Traceback (most recent call last):
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 617, in _execute
    self.__run_task_phase('abort')
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 453, in __run_task_phase
    response = self.__run_plugin(plugin, phase, args)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 519, in __run_plugin
    self.abort(msg, traceback=traceback)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 370, in abort
    raise TaskAbort(reason, silent=silent)
TaskAbort
2018-06-03 12:28 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 12:28 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.122832619954.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:52 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528026747.709294,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:52 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528026767.825509,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:53 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528026787.857487,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:53 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528026807.89541,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 12:54 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 12:54 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.125400329226.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:54 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 12:54 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.125410392435.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:54 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 12:54 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.125420436244.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 12:54 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 12:54 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.125430674224.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 13:21 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528028488.301318,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:21 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528028508.622292,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:22 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528028528.663983,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:22 WARNING  apscheduler.scheduler                 Error getting due jobs from job store u'default': (sqlite3.OperationalError) database is locked [SQL: u'SELECT apscheduler_jobs.id, apscheduler_jobs.job_state \nFROM apscheduler_jobs \nWHERE apscheduler_jobs.next_run_time <= ? ORDER BY apscheduler_jobs.next_run_time'] [parameters: (1528028548.697486,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:23 CRITICAL task          irc-tv-dl       BUG: Unhandled error in plugin configure_series: (sqlite3.OperationalError) database is locked [SQL: u'SELECT input_cache.id AS input_cache_id, input_cache.name AS input_cache_name, input_cache.hash AS input_cache_hash, input_cache.added AS input_cache_added \nFROM input_cache \nWHERE input_cache.name = ? AND input_cache.hash = ? AND input_cache.added > ?\n LIMIT ? OFFSET ?'] [parameters: ('trakt_list', '3df51d701f7fcc73456449b7fe0b6d7f', '2018-06-03 11:22:50.081105', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:23 CRITICAL manager       irc-tv-dl       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.132300140831.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 13:23 WARNING  task          irc-tv-dl       Aborting task (plugin: configure_series)
2018-06-03 13:23 WARNING  backlog       irc-tv-dl       No input snapshot available for `Ransom S02E08 1080p HEVC x265-MeGusta`, using current state
2018-06-03 13:23 CRITICAL task          irc-tv-dl       BUG: Unhandled error in plugin backlog: (sqlite3.OperationalError) database is locked [SQL: u'SELECT backlog.feed AS backlog_feed, backlog.json AS backlog_json, backlog.id AS backlog_id, backlog.title AS backlog_title, backlog.expire AS backlog_expire \nFROM backlog \nWHERE backlog.title = ? AND backlog.feed = ?\n LIMIT ? OFFSET ?'] [parameters: (u'Ransom S02E08 1080p HEVC x265-MeGusta', 'irc-tv-dl', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:23 CRITICAL manager       irc-tv-dl       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.132310186695.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 13:23 WARNING  task          irc-tv-dl       Aborting task (plugin: backlog)
2018-06-03 13:23 ERROR    task          irc-tv-dl       abort handlers aborted: 
Traceback (most recent call last):
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 617, in _execute
    self.__run_task_phase('abort')
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 453, in __run_task_phase
    response = self.__run_plugin(plugin, phase, args)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 519, in __run_plugin
    self.abort(msg, traceback=traceback)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 370, in abort
    raise TaskAbort(reason, silent=silent)
TaskAbort
2018-06-03 13:23 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 13:23 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.132320380239.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 13:23 CRITICAL task          monitor-rss     BUG: Unhandled error in plugin configure_series: (sqlite3.OperationalError) database is locked [SQL: u'SELECT input_cache.id AS input_cache_id, input_cache.name AS input_cache_name, input_cache.hash AS input_cache_hash, input_cache.added AS input_cache_added \nFROM input_cache \nWHERE input_cache.name = ? AND input_cache.hash = ? AND input_cache.added > ?\n LIMIT ? OFFSET ?'] [parameters: ('trakt_list', '3df51d701f7fcc73456449b7fe0b6d7f', '2018-06-03 11:23:20.428290', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 13:23 CRITICAL manager       monitor-rss     An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.132330476915.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 13:23 WARNING  task          monitor-rss     Aborting task (plugin: configure_series)
2018-06-03 13:49 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
2018-06-03 13:49 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.134936608970.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 14:19 INFO     content_size  monitor-rss     Entry `Air Doll 2009 1080p BluRay x264-USURY` too big, rejecting
2018-06-03 14:19 INFO     content_size  monitor-rss     Entry `Its Alive 1974 1080p BluRay x264-PSYCHD` too big, rejecting
2018-06-03 15:18 CRITICAL task          monitor-rss     BUG: Unhandled error in plugin configure_series: (sqlite3.OperationalError) database is locked [SQL: u'SELECT input_cache.id AS input_cache_id, input_cache.name AS input_cache_name, input_cache.hash AS input_cache_hash, input_cache.added AS input_cache_added \nFROM input_cache \nWHERE input_cache.name = ? AND input_cache.hash = ? AND input_cache.added > ?\n LIMIT ? OFFSET ?'] [parameters: ('trakt_list', '3df51d701f7fcc73456449b7fe0b6d7f', '2018-06-03 13:18:43.641603', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 15:18 CRITICAL manager       monitor-rss     An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.151853740570.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 15:18 WARNING  task          monitor-rss     Aborting task (plugin: configure_series)
2018-06-03 15:19 CRITICAL task          monitor-rss     BUG: Unhandled error in plugin status: (sqlite3.OperationalError) database is locked [SQL: u'SELECT status_task.task AS status_task_task, status_task.id AS status_task_id \nFROM status_task \nWHERE status_task.id = ?'] [parameters: (7,)] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-06-03 15:19 CRITICAL manager       monitor-rss     An unexpected crash has occurred. Writing crash report to /home/neil/flexget/crash_report.2018.06.03.151903945348.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.18
2018-06-03 15:19 WARNING  task          monitor-rss     Aborting task (plugin: status)
2018-06-03 15:19 ERROR    task          monitor-rss     abort handlers aborted: 
Traceback (most recent call last):
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 617, in _execute
    self.__run_task_phase('abort')
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 453, in __run_task_phase
    response = self.__run_plugin(plugin, phase, args)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 519, in __run_plugin
    self.abort(msg, traceback=traceback)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 370, in abort
    raise TaskAbort(reason, silent=silent)
TaskAbort
2018-06-03 15:19 CRITICAL task_queue                    Database error while running a task. Attempting to recover.
Traceback (most recent call last):
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task_queue.py", line 48, in run
    self.current_task.execute()
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 72, in wrapper
    return func(self, *args, **kw)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/task.py", line 643, in execute
    fire_event('task.execute.started', self)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/event.py", line 106, in fire_event
    result = event(*args, **kwargs)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/utils/simple_persistence.py", line 195, in load_task
    SimplePersistence.load(task.name)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/flexget/utils/simple_persistence.py", line 144, in load
    for skv in session.query(SimpleKeyValue).filter(SimpleKeyValue.task == task).all():
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2737, in all
    return list(self)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2889, in __iter__
    return self._execute_and_instances(context)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2912, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "/home/neil/flexget/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 507, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) database is locked [SQL: u'SELECT simple_persistence.feed AS simple_persistence_feed, simple_persistence.json AS simple_persistence_json, simple_persistence.id AS simple_persistence_id, simple_persistence.plugin AS simple_persistence_plugin, simple_persistence."key" AS simple_persistence_key, simple_persistence.added AS simple_persistence_added \nFROM simple_persistence \nWHERE simple_persistence.feed = ?'] [parameters: ('irc-tv-dl',)] (Background on this error at: http://sqlalche.me/e/e3q8)
Can you attach your configs @frankyw ?
Sure here you go.
[config.yml.zip](https://github.com/Flexget/Flexget/files/2069286/config.yml.zip)

@frankyw I'm not sure what the issue is tbh. It's a very simple config. Can you stop the daemon and then run it with `--debug-db-sessions` (eg. `flexget --debug-db-sessions --debug daemon start -d`)? And then paste the _entire_ log on pastebin or similar. Trace level logging would be even better, but its usefulness kinda depends on how quickly you can make it crash :smile: 
@cvium Okay...here it is, this is the entire log, thanks so much for investigating! The crash is at 19:46-19:47 :)

P.S. This is from the refactor_trakt_api branch.

https://paste.ee/p/SgvTT
Hmm, that's a different exception though.
See if you can make it throw the Locked-exception @frankyw. The log you pasted has given me _some_ ideas, but it's not really the exception you reported initially.
@cvium I'm sorry maybe I am missing something, the log I posted refers to locked exception and is the same crash after IRC match.

Lines: 833, 851, 862, 880, etc.

I also have another example, crash file attached (I missed the full log file as it has already rotated 10+ log files!)

[crash_report.2018.06.06.061335715322.log](https://github.com/Flexget/Flexget/files/2077322/crash_report.2018.06.06.061335715322.log)
@frankyw @zosky Good news and bad news.

**Good news:**
I've located the issue. The problem is with lazy fields (eg. trakt_lookup, imdb_lookup) and `backlog` plugin, which is used internally by series `timeframe`. More specifically, this line https://github.com/Flexget/Flexget/blob/develop/flexget/plugins/filter/series.py#L2131 forces an evaluation of _all_ lazy fields, which runs in a separate db session, but `series` already has a lock on the db at this point, which is why it crashes.

A quick fix is to add `object_session(episode).commit()` before this line or simply don't use lookup plugins with `timeframe`.

**Bad news:**
It's not an easy thing to fix. It's a fundamental problem with how we've implemented lazy lookups. It could take a long while to fix this properly. Sorry.
@cvium thank you for getting to the bottom of this & explaining _why_ is it crashing. 

pardon me, i still dont think i understand *what* is failing ? it seem like everything is  working ? my eps are getting adding to backlog, judged & upgraded...  it restarts (allot) and continues where it left off. 

is it loosing things that should have hit the backlog ? am i hammering trakt with requests for meta ? 

i'll try try the quick fix in a few days (when i have time to watch) & let you know
It only fails to save the lookups I think
@zosky did the quick fix work to stop the crashes mate?

@cvium thanks for tracking down the issue!
for years (i think) i've had this in cron. it ugly, but keeps things tidy
`@hourly	find ~/.flexget/ -name "crash_report*" -delete`

im just now getting around to turning this off and trying the suggested
seems no more. need to let it sit for a bit

**UPDATE** -- 5 hrs now, no crashes yet. seems great
- 4 added by target, 
- 3 added by timeframe 
- 18 still in the backlog 

thanks again

Resolving patch:
diff --git a/flexget/plugins/input/backlog.py b/flexget/plugins/input/backlog.py
--- a/flexget/plugins/input/backlog.py
+++ b/flexget/plugins/input/backlog.py
@@ -122,6 +122,19 @@ def on_task_input(self, task, config):
         # Return the entries from backlog that are not already in the task
         return injections
 
+    @plugin.priority(255)
+    def on_task_metainfo(self, task, config):
+        # Take a snapshot of any new entries' states before metainfo event in case we have to store them to backlog
+        # This is really a hack to avoid unnecessary lazy lookups causing db locks. Ideally, saving a snapshot
+        # should not cause lazy lookups, but we currently have no other way of saving a lazy field than performing its
+        # action.
+        # https://github.com/Flexget/Flexget/issues/1000
+        for entry in task.entries:
+            snapshot = entry.snapshots.get('after_input')
+            if snapshot:
+                continue
+            entry.take_snapshot('after_input')
+
     def on_task_abort(self, task, config):
         """Remember all entries until next execution when task gets aborted."""
         if task.entries:


Test patch: