You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When trying to connect to an RDS postgres instance, the connection request failed because it Error: Failed to connect to database which was resolved by adding ssl: { rejectUnauthorized: false } to the PostgresDatabaseAdapter
Describe the solution you'd like
To manage both local and remote postgres db connections, we can add the following: ssl: process.env.POSTGRES_URL.includes("localhost") ? undefined : { rejectUnauthorized: false }
this will allow for a local host instance or a remote instance connection string
if (process.env.POSTGRES_URL) {
elizaLogger.info("Initializing PostgreSQL connection...");
const db = new PostgresDatabaseAdapter({
connectionString: process.env.POSTGRES_URL,
parseInputs: true,
ssl: process.env.POSTGRES_URL.includes("localhost")
? undefined
: { rejectUnauthorized: false },
});```
**Describe alternatives you've considered**
i tried adding the SSL flag to the connection string without great success
**Additional context**
Open to suggestions on alternate implementations that achieve the same
The text was updated successfully, but these errors were encountered:
Hello @JoseRoberts87! Welcome to the ai16z community. Thank you for opening your first issue; we appreciate your contribution. You are now a ai16z contributor!
Is your feature request related to a problem? Please describe.
When trying to connect to an RDS postgres instance, the connection request failed because it
Error: Failed to connect to database
which was resolved by addingssl: { rejectUnauthorized: false }
to the PostgresDatabaseAdapterDescribe the solution you'd like
To manage both local and remote postgres db connections, we can add the following:
ssl: process.env.POSTGRES_URL.includes("localhost") ? undefined : { rejectUnauthorized: false }
this will allow for a local host instance or a remote instance connection string
The text was updated successfully, but these errors were encountered: