Skip to content

Commit c78c189

Browse files
committed
add-troubleshooting-and-note
1 parent 732ec1e commit c78c189

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

docs/docs/Develop/configuration-custom-database.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@ Langflow can more efficiently handle multiple users and larger workloads by usin
4242
LANGFLOW_DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
4343
```
4444

45-
Langflow uses [SQLAlchemy](https://www.sqlalchemy.org/) with the [psycopg](https://www.psycopg.org/) driver to pass SSL parameters directly to the PostgreSQL connection. The following SSL modes are supported:
45+
Langflow uses [SQLAlchemy](https://www.sqlalchemy.org/) with the [psycopg](https://www.psycopg.org/) driver to pass SSL parameters directly to the PostgreSQL connection.
46+
47+
:::note PostgreSQL driver compatibility
48+
Langflow requires `psycopg2-binary` or `psycopg[binary]` as the PostgreSQL driver. The `asyncpg` driver is not compatible with Langflow's current database schema due to stricter timezone handling requirements.
49+
:::
50+
51+
The following SSL modes are supported:
4652

4753
- **`sslmode=require`**: Requires SSL connection but doesn't verify server certificate. This option is the least secure, but acceptable for most use cases.
4854
```bash

docs/docs/Support/troubleshooting.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,18 @@ In Langflow OSS, you can follow the error message's instructions to install the
147147

148148
To manage dependencies in Langflow Desktop, see [Install custom dependencies in Langflow Desktop](/install-custom-dependencies#langflow-desktop).
149149

150+
### PostgreSQL asyncpg driver compatibility issue
151+
152+
If you encounter errors when initializing Langflow with a PostgreSQL database, such as:
153+
154+
```text
155+
sqlalchemy.exc.DBAPIError: (sqlalchemy.dialects.postgresql.asyncpg.Error) <class 'asyncpg.exceptions.DataError'>: invalid input for query argument $7: datetime.datetime(2025, 10, 31, 14, 8, 5... (can't subtract offset-naive and offset-aware datetimes)
156+
```
157+
158+
This error occurs because `asyncpg` has stricter timezone handling than `psycopg2`, and is not fully compatible with Langflow's current database schema.
159+
160+
To resolve this issue, remove `asyncpg` from your installation and use `psycopg2` instead.
161+
150162
## Langflow upgrade issues
151163

152164
The following issues can occur when upgrading your Langflow version.

0 commit comments

Comments
 (0)