From 822372ed7c28b7f410be9776aac219e9b6200e4a Mon Sep 17 00:00:00 2001 From: Paul Fitzpatrick Date: Mon, 8 Nov 2021 10:19:28 -0500 Subject: [PATCH] (core) copy settings related to gvisor from staging to prod Summary: This enables ptrace and modifies a nofile limit, to be consistent with staging. The nofile change isn't really needed, it was for gvisor's vfs2 which we are no longer using, it is just for consistency. This diff also documents the PYTHON_VERSION_ON_CREATION=3 flag active in staging and ~~soon to be active in~~ production. Test Plan: settings work in staging Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D3125 --- test/nbrowser/testServer.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/nbrowser/testServer.ts b/test/nbrowser/testServer.ts index b82caf18..d051a3b7 100644 --- a/test/nbrowser/testServer.ts +++ b/test/nbrowser/testServer.ts @@ -232,6 +232,14 @@ export class TestServerMerged implements IMochaServer { if (origTypeormDB) { process.env.TYPEORM_DATABASE = origTypeormDB; } + // If this is Sqlite, we are making a separate connection to the database, + // so could get busy errors. We bump up our timeout. The rest of Grist could + // get busy errors if we do slow writes though. + const connection = this._dbManager.connection; + const sqlite = connection.driver.options.type === 'sqlite'; + if (sqlite) { + await this._dbManager.connection.query('PRAGMA busy_timeout = 3000'); + } } return this._dbManager; }