Opened 6 years ago

Closed 4 years ago

#5076 closed defect (cant-reproduce)

OperationalError: (OperationalError) database is locked None None

Reported by: davidak Owned by:
Priority: major Milestone:
Component: programming Keywords:
Cc: Parent Tickets:


i uploaded a jpg and want to delete it now.

i clicked to delete it and get an internal server error page:

File '/var/www/mediagoblin/lib/python2.7/site-packages/Paste-', line 144 in __call__
  app_iter = self.application(environ, sr_checker)
File '/var/www/mediagoblin/lib/python2.7/site-packages/Paste-', line 203 in __call__
  return app(environ, start_response)
File '/var/www/mediagoblin/lib/python2.7/site-packages/Beaker-1.6.4-py2.7.egg/beaker/', line 155 in __call__
  return self.wrap_app(environ, session_start_response)
File '/var/www/mediagoblin/mediagoblin/', line 236 in __call__
  return self.call_backend(environ, start_response)
File '/var/www/mediagoblin/mediagoblin/', line 216 in call_backend
  response = controller(request)
File '/var/www/mediagoblin/mediagoblin/', line 224 in wrapper
  return controller(request, media=media, *args, **kwargs)
File '/var/www/mediagoblin/mediagoblin/', line 48 in new_controller_func
  return controller(request, *args, **kwargs)
File '/var/www/mediagoblin/mediagoblin/', line 78 in wrapper
  return controller(request, *args, **kwargs)
File '/var/www/mediagoblin/mediagoblin/user_pages/', line 284 in media_confirm_delete
File '/var/www/mediagoblin/mediagoblin/db/', line 261 in delete
  super(MediaEntry, self).delete(**kwargs)
File '/var/www/mediagoblin/mediagoblin/db/', line 59 in delete
File '/var/www/mediagoblin/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-i686.egg/sqlalchemy/orm/', line 703 in commit
File '/var/www/mediagoblin/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-i686.egg/sqlalchemy/orm/', line 365 in commit
File '/var/www/mediagoblin/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-i686.egg/sqlalchemy/engine/', line 2045 in commit
File '/var/www/mediagoblin/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-i686.egg/sqlalchemy/engine/', line 2075 in _do_commit
File '/var/www/mediagoblin/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-i686.egg/sqlalchemy/engine/', line 1280 in _commit_impl
  self._handle_dbapi_exception(e, None, None, None, None)
File '/var/www/mediagoblin/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-i686.egg/sqlalchemy/engine/', line 1277 in _commit_impl
File '/var/www/mediagoblin/lib/python2.7/site-packages/SQLAlchemy-0.7.9-py2.7-linux-i686.egg/sqlalchemy/engine/', line 307 in do_commit
OperationalError: (OperationalError) database is locked None None

SERVER_SOFTWARE 'Apache/2.2.17 (Ubuntu)'
HTTP_USER_AGENT 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36'

after that, the image was deleted but the database entry is still there:


Change History (5)

comment:1 Changed 6 years ago by davidak

i uploaded another jpg and deleted it succesfully. i think it was a temporary problem with the database.
that shouldn't happen neither the user should see such an error page.

an administrator should get informed about it.

comment:2 Changed 5 years ago by Loic Dachary

@davidak was it with sqlite or postgres ?

comment:3 Changed 5 years ago by Aeva

@loic is sqlite

comment:4 Changed 4 years ago by Ben Sturmfels

Hi David,

Thanks for raising this issue and sorry for the slow response on this. I've tried this myself on the default SQLite database, but wasn't able to repeat the issue. Would you mind trying again and letting us know if it still occurs for you? If not, we might close the issue and assume it was just a temporary problem.

(Also worth noting that we should probably delete from the database before deleting the file.)


comment:5 Changed 4 years ago by Ben Sturmfels

Resolution: worksforme
Status: newclosed

David, I'll tentatively close this ticket as we haven't had a response from you yet. Please don't hesitate to re-open this if you find the locked database error is still occurring for you.

Note: See TracTickets for help on using tickets.