Something that is worth mentioning in the documentation is that MySQL is configured on many machines to default to a maximum query size (max_allowed_packet) of 1M. With approximately 1600 messages in my inbox, the attempt to generate a cache of the INBOX folder (a 1.2 MB query) threw unknown errors:
DB Error: unknown error in /www/roundcubemail/program/include/rcube_db.inc on line 124
The resolution is simple enough: In the [mysqld] section of my.cnf, change the max_allowed_packet to a larger value: set-variable = max_allowed_packet=16M
cheers, Shaun Walbridge