<@ULVA73B9P> If postgres is disabled in prefect-s...
# marvin-in-the-wild
c
@Marvin If postgres is disabled in prefect-server helm chart. does it use SQLite instead?
m
Based on the Prefect documentation, SQLite is the default database for Prefect and is recommended for lightweight, single-server deployments. PostgreSQL is another supported database and is recommended when connecting to external databases, but it requires additional setup. If you disable PostgreSQL in the Prefect server helm chart, Prefect does not automatically default to using SQLite. Prefect's server component and its database must be hosted in an environment that supports long-running processes, and in Kubernetes, the usage of in-cluster SQLite is not explicitly mentioned or recommended. For the Kubernetes deployment using the Prefect helm chart, the assumption is that a PostgreSQL database is being used. The helm chart values would typically be configured to connect to a PostgreSQL instance. If you disable PostgreSQL, you would need to manually configure the helm chart or Prefect settings to use a different database, such as an externally hosted SQLite or another PostgreSQL service. For more detailed information, you could refer to the following link from the Prefect documentation which discusses hosting options, although it is not specific about the helm chart configuration with respect to databases: - Prefect Hosting Options Remember to check for any updates in the official documentation to see if there have been changes to the recommended database configurations when using the Prefect server helm chart.
c
@Marvin I have postgres disabled but it still functions. and the server pod logs say this. sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
m
Your message was too long by 20 tokens - please shorten it and try again. For reference, here's your message at the allowed limit:
I have postgres disabled but it still functions. and the server pod logs say this.
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked [SQL: INSERT INTO worker (name, last_heartbeat_time, heartbeat_interval_seconds, work_pool_id, id, created, updated) VALUES (:name, :last_heartbeat_time, :heartbeat_interval_seconds, :work_pool_id, :id, :created, :updated) ON CONFLICT (work_pool_id, name) DO UPDATE SET last_heartbeat_time = :param_1, heartbeat_interval_seconds = :param_2] [parameters: {'name': 'KubernetesWorker e5379db5-146a-431b-9b0a-73441228a333', 'last_heartbeat_time': '2024-04-16 170716.657543', 'heartbeat_interval_seconds': 30, 'work_pool_id': '78aeb4d2-6313-4fe2-8dc0-47ade2b3b206', 'id': '909299c0-71c0-4d83-9094-348d525fda7a', 'created': '2024-04-16 170716.658176', 'updated': '2024-04-16 170716.658184', 'param_1': '2024-04
c
@Marvin I have postgres disabled but it still functions. and the server pod logs say this. sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked (edited)
n
hi @Connor Ashcroft unfortunately this error does come up sometimes with sqlite
database is locked
out of curiosity, why don't you want postgres for your server on k8s?
c
Hi @Nate I have been trying to use prefect with Azure PostgresqL. But I couldn't get it to work, so I disabled postgres temporarily. And this just caused it to use sqlite.