Buildbot requires a connection to a database to maintain certain state
information, such as tracking pending build requests. By default this is
stored in a sqlite file called 'state.sqlite' in the base directory of your
master. This can be overridden with the
This parameter is of the form:
For sqlite databases, since there is no host and port, relative paths are
sqlite:/// and absolute paths with
c['db_url'] = "sqlite:///state.sqlite" c['db_url'] = "mysql://user:firstname.lastname@example.org/database_name?max_idle=300"
When using a MySQL database, multiple buildbot masters can share the same
database. Keep in mind that there is a single namespace for schedulers and
builders for all masters using the same database. One suggested configuration
is to have one buildbot master configured with just the schedulers and change
sources, and then other masters configured with just the builders. To enable
this mode, you will need to set the
multiMaster option so that buildbot
doesn't complain about missing schedulers or builders. You'll also need to set
db_poll_interval so the masters with builders check the database for new
builds at the configured interval.
max_idle argument for MySQL connections should be set to something
less than the wait_timeout configured for your server. This ensures that
connections are closed and re-opened after the configured amount of idle time.
If you see errors such as
'MySQL server has gone away'), this means your
max_idle setting is
probably too high.
show global variables like 'wait_timeout'; will show
what the currently configured wait_timeout is on your MySQL server.
# Enable multiMaster mode; disables warnings about unknown builders and # schedulers c['multiMaster'] = True # Check for new build requests every 60 seconds c['db_poll_interval'] = 60