1. Marcin Kuzminski
  2. RhodeCode

Issues

Issue #832 new

Pull request only works for own repository (database is locked)

Wolfgang Baron
created an issue

I am using RhodeCode 1.6.0rc1 (first installation, no update). I have a hello repository, cloned from http://www.selenic.com/repo/hello. Then I have a fork of hello, called hello2. In hello2, a user commits a change and then tries to create a pull request, which is automatically directed to repository hello. When someone (not the owner of the repository) creates a pull request, the email gets sent, but the requesting user sees a red banner containing "Error occured during sending pull request". This is caused by a caught exception. The output of the rhodecode process (python paster serve production.ini) contains an error with a traceback, because the database is locked during "INSERT INTO notifications". The complete traceback is in the attachment. The pull request cannot be found afterwards. Creating a new Pull request causes the same URL to be used in the email, which gets sent.

Creating a pull request by the owner of the repositories works.

Comments (4)

  1. Marcin Kuzminski repo owner

    Database locked error is common issues with SQLite that happens when there's to many operation on the database. It's very odd since one operation shouldn't trigger that (it doesn't trigger on my sqlite setup but it might be related to users etc). Not sure how to response to that one except switch to a "real" database like mysql or postgres.

  2. Wolfgang Baron reporter

    I will try that, although I don't really understand, what is supposed to cause the many operations, as I am the only one experimenting on this installation. Should I try and stop the celery process? Where can I find a guide how to migrate data from one database to another?

  3. Marcin Kuzminski repo owner

    One thing is that when you run celery there could be a slight chance of race condition when celery as a separate process does database lock, and rhodecode wants to access it.

    One thing that is worth trying is to increase the limit of sqlite timeout. use such DB url in the .ini file and let me know if that fixes it.

    sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
    
  4. Wolfgang Baron reporter

    Increasing the timeout did not help. The email notification was sent immediately and the error message in the browser, from which the puill request was supposed to be sent appeared with increased delay. Then I deactivated celery and it immediately worked. So I guess it must be something deterministic. As Rhodecode is configured for sqlite and celery by default, I think this should be fixed.

    What is the best way to migrate my sqlite data into mysql without loosing any data?

  5. Log in to comment