Unverified Commit 06325124 authored by drewblin's avatar drewblin Committed by GitHub

fix: set autocommit for mysql (#2638)

If in server config mysql has autocommit = 0, then wikijs fails with locks like this: ``` 2020-10-30T12:56:51.725Z [JOB] error: Rebuilding page tree: [ FAILED ] 2020-10-30T12:56:51.726Z [JOB] error: truncate `pageTree` - Lock wait timeout exceeded; try restarting transaction ```
parent b5af931f
......@@ -140,6 +140,10 @@ module.exports = {
await conn.query(`set application_name = 'Wiki.js'`)
done()
break
case 'mysql':
await conn.promise().query(`set autocommit = 1`)
done()
break
default:
done()
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment