Skip to content

Paralel processing of incoming hook calls #8

@mikicz

Description

@mikicz

So today I got a first errors report on Sentry from the app, specifically that the pulling of the repository failed because there was already a pull in progress in a different process - two requests came at a very similar time (two seconds apart) and because I configured Apache to have two workers, it processed them in parallel.

It happened for the first time since the app started to be used, so we might not need to solve it yet, but eventually it might become more of a problem.

Two possible solutions come into mind - reducing the number of workers to one (not really ideal) or some kind of locking mechanism around the pulling of the repository.

The error message:

Cmd('git') failed due to: exit code(1)
  cmdline: git pull -v origin
  stderr: 'fatal: Unable to create '<project_path>/.arca/repos/github.com_pyvec_naucse.python.cz/master/.git/refs/remotes/origin/master.lock': File exists.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions