After `ssh -p 29418 gerrit gerrit gc -all`, it fell into offline mode with message in error.log:
java.lang.IllegalStateException: Missing project All-Projects
At the same time, All-Projects was present and almost correct, except absense of ./HEAD.
Fixed by creating HEAD with a single line:
(really its contents aren't important)
но напугался заметно.