Open tpokorra opened 8 years ago
the question is why do we need an increased timeout? which query is blocking the database for so long?
is it the logs writing quite often to the database?
should we offer an alternative db access method for Mysql? modify ConnectDatabase
need to convert existing sqlite database to mysql? http://stackoverflow.com/a/1067365/1632368
or first try to work with a single db connection, rather than creating a new connection for each method? Problem both Logger and Lightbuildserver.py need to have a connection
Fedora23, mysql:
dnf install python3-mysql mariadb-server
systemctl enable mariadb
systemctl start mariadb
mysql
CREATE DATABASE lbs DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
GRANT ALL ON lbs.* TO lbs@localhost IDENTIFIED BY 'secret';
# open lbs in webbrowser, that should create the database
sqlite3 /var/lib/lightbuildserver/db/lightbuildserver.db .dump > my.sql
# only need the insert statements for table build
# :%s/"build"/`build`(id,status,username,projectname,packagename,branchname,distro,`release`,arch,dependsOnOtherProjects,buildmachine,started,finished, buildsuccess, buildnumber, hanging, avoidlxc,avoiddocker)/g
# instead of sequences: ALTER TABLE build AUTO_INCREMENT=5000;
Later (might be unrelated):