1. Marcin Kuzminski
  2. RhodeCode

Issues

Issue #839 resolved

First request to a file at specific revision fails just after a push

Daniel LaMotte
created an issue

Cant really explain it, because if the page is requested again, it shows up magically...

For example:

http://host.com/code/test-pull-request/files/38e8b5029781d844b40067b9624f72d34ede73c2/hello.py

Just after I push that rev to Rhodecode, if I go directly to that URL... it fails saying the file isn't in the repository. This causes a pull request to fail to be created and breaks integration with Review Board (because Review Board gets a 404 instead of the actual file existing).

It's very troublesome.

Comments (9)

  1. Marcin Kuzminski repo owner

    I often seen that issues when people used multiprocess setup with gunicorn or Apache. Then the cache was invalidated only on one process while the other had old cache, thus throwing errors about non-existing revisions.

  2. Daniel LaMotte reporter

    That's definitely it then. I'm using multi-process gunicorn.

    What's the solution? Waitress? Running a single gunicorn?

    Why is there a process-local cache being used instead of a global cache like memcached? Do I need to configure something to use memcached/redis?

  3. Daniel LaMotte reporter

    Working much better now with waitress. Thanks.

    Basically, the instance_id is local to each process? But since a multi-process worker like gunicorn shares configuration between the process, it fails?

    This should be resolved now I would think. Thanks for the quick help.

  4. Marcin Kuzminski repo owner

    yes, if you could make gunicorn run two processes with different .ini file that should work fine in theory. In next release we're done some more work to make this system better, for example you don't need to specify separate .ini file. But for now i recommend using it with load-balancing setup like in docs. Cheers

  5. Log in to comment