Skip to content

Handle errors if database is busy #115

Description

@pjmc-oliveira

Sometimes when executing a second request quickly after an initial request (that is still writing to the database), application will crash as database is busy

2019-04-02 17:39:53.700 [index.js] INFO: [POST] request to /analyse
2019-04-02 17:39:53.702 [clone.js] DEBUG: Initializing repository Clone from: 'https://github.com/pjmc-oliveira/HubListener'
2019-04-02 17:39:53.702 [clone.js] DEBUG: clonePath not passed, creating from URL
2019-04-02 17:39:53.702 [clone.js] DEBUG: Clone directory found at: '.../HubListener/src/repos/pjmc-oliveira/HubListener'
2019-04-02 17:39:53.703 [clone.js] DEBUG: Pulling latest changes...
2019-04-02 17:39:53.705 [clone.js] DEBUG: Changes successfuly pulled!
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: SQLITE_BUSY: database is locked
Emitted 'error' event at:

[nodemon] app crashed - waiting for file changes before starting...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions