double-take
double-take copied to clipboard
[BUG] SQLite too many SQL variables
Describe the bug A clear and concise description of what the bug is.
I'm getting an error after a while of using double-take (perhaps 1 week of double-take working fine) and the error is "too many SQL variables"
Version of Double Take
X.X.X-SHA7
Version 1.7.0
Expected behavior A clear and concise description of what you expected to happen.
To work as normal but for a longer period
Screenshots If applicable, add screenshots to help explain your problem.
Hardware
- OS: [e.g. Ubuntu, macOS, Windows]
- Browser (if applicable) [e.g. Chrome, Safari]
Double-take runs in a docker container
Additional context Add any other context about the problem here.
Actual error as shown in the logs:
} 21-12-10 13:23:32 error: SqliteError: too many SQL variables at Database.prepare (/double-take/api/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21) at module.exports.get (/double-take/api/src/controllers/match.controller.js:97:6) at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20) at Layer.handle [as handle_request] (/double-take/api/node_modules/express/lib/router/layer.js:95:5) at next (/double-take/api/node_modules/express/lib/router/route.js:137:13) at /double-take/api/src/middlewares/index.js:42:5 at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20) at Layer.handle [as handle_request] (/double-take/api/node_modules/express/lib/router/layer.js:95:5) at next (/double-take/api/node_modules/express/lib/router/route.js:137:13) at middleware (/double-take/api/node_modules/express-validator/src/middlewares/check.js:16:13) 21-12-10 13:30:25 error: SqliteError: too many SQL variables at Database.prepare (/double-take/api/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21) at module.exports.get (/double-take/api/src/controllers/match.controller.js:97:6) at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20) at Layer.handle [as handle_request] (/double-take/api/node_modules/express/lib/router/layer.js:95:5) at next (/double-take/api/node_modules/express/lib/router/route.js:137:13) at /double-take/api/src/middlewares/index.js:42:5 at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20) at Layer.handle [as handle_request] (/double-take/api/node_modules/express/lib/router/layer.js:95:5) at next (/double-take/api/node_modules/express/lib/router/route.js:137:13) at middleware (/double-take/api/node_modules/express-validator/src/middlewares/check.js:16:13)
Having this same error, SQLite can be a pain in the ass if you're working with lots of data. Think the problem is caused when there are too many face detections in one photo which contains more data than you can put in a single row for SQLite (therefore the too many variables error). This is probably not a problem for most but I just had a large gathering at my house and loaded up Double Take to see this error. Simplest solution I can think of would be to just upgrade to postgres, but perhaps there's a reason that was avoided in development.
Same here. Not sure about the issue being caused by many faces, since there can't be more than two on my setup (maybe 3 with a false positive?).