Comments (3)
We've also encountered the same timeout error during app initialization with v1.16.0
, v1.17.0
and v1.18.0
.
After some investigation, we managed to resolve it by adding the connectionTimeout
configuration parameter to the createPoolByEnv function:
const createPoolByEnv = async (
databaseDsn: string,
mockDatabaseConnection: boolean,
poolSize?: number,
connectionTimeout?: number
) => {
// Database connection is disabled in unit test environment
if (mockDatabaseConnection) {
return createMockPool({ query: async () => createMockQueryResult([]) });
}
assert(parseDsn(databaseDsn).databaseName, new Error('Database name is required'));
return createPool(databaseDsn, {
interceptors: createInterceptorsPreset(),
maximumPoolSize: poolSize,
connectionTimeout: connectionTimeout,
});
};
Additionally, we've added an environment variable named DATABASE_CONNECTION_TIMEOUT
, which if unset will have the default value of 10_000 (in our case setting it to 30_000 resolved the issue).
This way, the environment variable will remain optional, allowing people to adjust this setting if needed.
Is this something you would consider including in the next release? Happy to contribute and help with the implementation.
from logto.
It seems you have issues connecting to the database. Can you share your config?
from logto.
It seems you have issues connecting to the database. Can you share your config?
This is my db config
DB_URL=postgres://postgres.woefiqksuduiihlynziwdydegh:[email protected]:6543/postgres
from logto.
Related Issues (20)
- Bishos HOT 1
- bug: WordPress Logout error HOT 4
- feature request: add PWA support HOT 1
- Enable running as "rootless" on kubernetes (problem with alteration-scripts writability) HOT 1
- ‘This sign-in method is not enabled’ when signing in with an email or mobile phone number. HOT 3
- feature request: check me out and maybe let's start cooperation on business plane of things? HOT 1
- bug: Can not use redirect URI other than /callback in next app HOT 1
- bug: Infinite loop login HOT 4
- feature request: support `AbortSignal` in custom JWT claims code HOT 3
- bug: user roles update via PUT always throws invalid body error HOT 3
- feature request: how can I create multiple same type connectors?
- How to add a wildcard domain callback URL HOT 1
- feature request: Make preferred_username standard claim have the same value as username by default HOT 1
- bug: Not able to work as OIDC to Cloudflare Zero Trust (2) HOT 3
- bug: User "logto_tenant_logto" has no password assigned.' HOT 2
- feature request: Add email based 2FA OTP system HOT 1
- bug: error load-connector HOT 1
- bug: Localization error on sing-up experience in Polish HOT 2
- bug: App crash on initialization with docker compose deployment
- bug: logto service is getting restarted and not running in self hosted Coolify
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logto.