504 Gateway Timeout login Roundcube

The solution was to disable the ‘carddav’ plugin, as described in this topic