This config is working for me including regeneration of style images after being flushed.

In case you are searching for why you can still get a 504 gateway timeout when you have already increased max_execution_time in php.ini: try adding this to your fastcgi_params file:

UPDATE: Turns out this was also happening when we were running an Nginx + HHVM server. Of course I went searching for a max_execution_time value but as far as I could tell HHVM doesn’t have that and it turned out to be this nginx timeout once again.


Be gentle, this is my first real script in Python. It can probably take a bit of cleaning up and it still outputs a bunch of feedback for debugging.

This script takes a repo_url, a checkout location and a list of branches to work with.
It checks if there have been changes to a branch in the last 14 days, if not it creates a tag in trunk and deletes the branch then recreates it. It even goes so far as to switch the location of the checkout location to the newly created branch.