Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recieving sqlite related errors, but dialect used is postgres #17305

Open
3 tasks
markring opened this issue May 3, 2024 · 0 comments
Open
3 tasks

Recieving sqlite related errors, but dialect used is postgres #17305

markring opened this issue May 3, 2024 · 0 comments
Labels
pending-approval Bug reports that have not been verified yet, or feature requests that have not been accepted yet type: bug

Comments

@markring
Copy link

markring commented May 3, 2024

Issue Creation Checklist

  • [x ] I understand that my issue will be automatically closed if I don't fill in the requested information
  • [ x] I have read the contribution guidelines

Bug Description

When connecting to, or querying database I am getting the error 'SQLITE_BUSY: database is locked' within an object that is consoled out in NodeJS, which includes database credentials. This happens with each transaction.

Executing (default): SELECT i.relname AS name, ix.indisprimary AS primary, ix.indisunique AS unique, ix.indkey AS indkey, array_agg(a.attnum) as column_indexes, array_agg(a.attname) AS column_names, pg_get_indexdef(ix.indexrelid) AS definition FROM pg_class t, pg_class i, pg_index ix, pg_attribute a, pg_namespace s WHERE t.oid = ix.indrelid AND i.oid = ix.indexrelid AND a.attrelid = t.oid AND t.relkind = 'r' and t.relname = 'Specifications' AND s.oid = t.relnamespace AND s.nspname = 'blog' GROUP BY i.relname, ix.indexrelid, ix.indisprimary, ix.indisunique, ix.indkey ORDER BY i.relname; {
plain: false,
raw: true,
logging: [Function: error],
timestamps: true,
validate: {},
freezeTableName: false,
underscored: false,
paranoid: false,
rejectOnEmpty: false,
whereCollection: null,
schema: 'blog',
schemaDelimiter: '',
defaultScope: {},
scopes: {},
indexes: [],
whereMergeStrategy: 'overwrite',
name: { plural: 'Specifications', singular: 'Specification' },
omitNull: false,
sequelize: <ref *1> Sequelize {
options: {
dialect: 'postgres',
dialectModule: null,
dialectModulePath: null,
host: 'localhost',
protocol: 'tcp',
define: {},
query: {},
sync: {},
timezone: '+00:00',
standardConformingStrings: true,
logging: [Function: error],
omitNull: false,
native: false,
replication: false,
ssl: undefined,
pool: [Object],
quoteIdentifiers: true,
hooks: {},
retry: [Object],
transactionType: 'DEFERRED',
isolationLevel: null,
databaseVersion: '16.2.0',
typeValidation: false,
benchmark: false,
minifyAliases: false,
logQueryParameters: false,
attributeBehavior: 'throw',
schema: 'blog'
},
config: {
database: 'ringworks',
username: 'OOPS!',
password: 'OOPS!',
host: 'localhost',
port: 5432,
pool: [Object],
protocol: 'tcp',
native: false,
ssl: undefined,
replication: false,
dialectModule: null,
dialectModulePath: null,
keepDefaultTimezone: undefined,
dialectOptions: undefined
},
dialect: PostgresDialect {
sequelize: [Circular *1],
connectionManager: [ConnectionManager],
queryGenerator: [PostgresQueryGenerator],
queryInterface: [PostgresQueryInterface]
},
queryInterface: PostgresQueryInterface {
sequelize: [Circular *1],
queryGenerator: [PostgresQueryGenerator]
},
models: { Graphics_Cards: Graphics_Cards, Specifications: Specifications },
modelManager: ModelManager { models: [Array], sequelize: [Circular *1] },
connectionManager: ConnectionManager {
sequelize: [Circular *1],
config: [Object],
dialect: [PostgresDialect],
versionPromise: null,
dialectName: 'postgres',
pool: [Pool],
lib: [PG],
nameOidMap: [Object],
enumOids: [Object],
oidParserMap: [Map]
}
},
hooks: true,
dialect: 'postgres',
dialectModule: null,
dialectModulePath: null,
host: 'localhost',
protocol: 'tcp',
define: {},
query: {},
sync: {},
timezone: '+00:00',
standardConformingStrings: true,
native: false,
replication: false,
ssl: undefined,
pool: { max: 10, min: 0, acquire: 30000, idle: 10000 },
quoteIdentifiers: true,
retry: { max: 5, match: [ 'SQLITE_BUSY: database is locked' ] },
transactionType: 'DEFERRED',
isolationLevel: null,
databaseVersion: 0,
typeValidation: false,
benchmark: false,
minifyAliases: false,
logQueryParameters: false,
attributeBehavior: 'throw',
force: false,
type: 'SHOWINDEXES'
}
Database and tables created successfully.

Reproducible Example

Here is the link to the SSCCE for this issue:

  • Sequelize version: "sequelize": "^6.37.3"
  • Node.js version: v20.12.2
  • If TypeScript related: TypeScript version:
  • Database & Version: postgreSQL v16
  • Connector library & Version:

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I will need guidance.
  • No, I don't have the time, but my company or I are supporting Sequelize through donations on OpenCollective.
  • [x ] No, I don't have the time, and I understand that I will need to wait until someone from the community or maintainers is interested in resolving my issue.

Indicate your interest in the resolution of this issue by adding the 👍 reaction. Comments such as "+1" will be removed.

@markring markring added pending-approval Bug reports that have not been verified yet, or feature requests that have not been accepted yet type: bug labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-approval Bug reports that have not been verified yet, or feature requests that have not been accepted yet type: bug
Projects
None yet
Development

No branches or pull requests

1 participant