Deployment to Render fail
Bug Description
==> Deploying...
[08/01/24 18:52:06] INFO 2024-08-01 18:52:06 - INFO - main - main.py:228
Setting up app with static files
directory None
[08/01/24 18:52:07] INFO 2024-08-01 18:52:07 - INFO - init.py:1762
init - Starting gunicorn
22.0.0
INFO 2024-08-01 18:52:07 - INFO - init.py:1762
init - Listening at:
http://0.0.0.0:7860/ (67)
INFO 2024-08-01 18:52:07 - INFO - init.py:1762
init - Using worker:
langflow.server.LangflowUvicornWor
ker
INFO 2024-08-01 18:52:07 - INFO - init.py:1762
init - Booting worker with
pid: 68
INFO 2024-08-01 18:52:07 - INFO - init.py:1762
init - Started server process
[68]
INFO 2024-08-01 18:52:07 - INFO - init.py:1762
init - Waiting for application
startup.
Starting Langflow v1.0.14...
INFO 2024-08-01 18:52:07 - INFO - service.py:77
service - sqlite connect listener,
setting pragmas
INFO 2024-08-01 18:52:07 - INFO - service.py:195
service - Alembic already
initialized
INFO 2024-08-01 18:52:07 - INFO - service.py:197
service - Running DB migrations in
/app/.venv/lib/python3.12/site-packa
ges/langflow/alembic
[08/01/24 18:52:08] WARNING 2024-08-01 18:52:08 - WARNING - utils utils.py:30
- Error retrieving messages from
monitor service: IO Error: Cannot open
database
"/app/data/.cache/langflow/monitor.duck
db" in read-only mode: database does
not exist
WARNING 2024-08-01 18:52:08 - WARNING - utils utils.py:166
- Error retrieving transactions from
monitor service: IO Error: Cannot open
database
"/app/data/.cache/langflow/monitor.duc
kdb" in read-only mode: database does
not exist
INFO 2024-08-01 18:52:08 - INFO - service.py:77
service - sqlite connect listener,
setting pragmas
INFO 2024-08-01 18:52:08 - INFO - utils utils.py:116
- No LLM cache set.
[08/01/24 18:52:09] INFO 2024-08-01 18:52:09 - INFO - service.py:29
service - Should store environment
variables in the database.
INFO 2024-08-01 18:52:09 - INFO - setup setup.py:604
- Super user initialized
INFO 2024-08-01 18:52:09 - INFO - utils utils.py:474
- Building custom components from
['/app/.venv/lib/python3.12/site-packa
ges/langflow/components']
/app/.venv/lib/python3.12/site-packages/pysbd/segmenter.py:66: SyntaxWarning: invalid escape sequence '\s'
for match in re.finditer('{0}\s*'.format(re.escape(sent)), self.original_text):
/app/.venv/lib/python3.12/site-packages/pysbd/lang/arabic.py:29: SyntaxWarning: invalid escape sequence '.'
txt = re.sub('(?<={0}).'.format(am), '∯', txt)
/app/.venv/lib/python3.12/site-packages/pysbd/lang/persian.py:29: SyntaxWarning: invalid escape sequence '.'
txt = re.sub('(?<={0}).'.format(am), '∯', txt)
==> No open HTTP ports detected on 0.0.0.0, continuing to scan...
==> No open HTTP ports detected on 0.0.0.0, continuing to scan...
==> No open HTTP ports detected on 0.0.0.0, continuing to scan...
==> No open HTTP ports detected on 0.0.0.0, continuing to scan...
==> No open HTTP ports detected on 0.0.0.0, continuing to scan...
==> Port scan timeout reached, no open HTTP ports detected. If you don't need to receive public HTTP traffic, create a private service instead.
Reproduction
I followed these steps https://github.com/langflow-ai/langflow/blob/main/docs/docs/Deployment/deployment-render.md
Expected behavior
Should successfully install
Who can help?
No response
Operating System
Render
Langflow Version
1.0.14
Python Version
None
Screenshot
No response
Flow File
No response
Hey there, @Gluepower! I'm here to help you with debugging, answering questions, and becoming a contributor. Let's squash those bugs together! 🐞
To resolve the deployment failure of Langflow v1.0.14 on Render due to missing database files and IO errors, ensure the disk is properly mounted and the database file path is correctly set. Based on the provided render.yaml configuration, the LANGFLOW_DATABASE_URL environment variable is set to use an SQLite database located at /home/user/.cache/langflow/langflow.db, and a disk is mounted at /home/user/.cache/langflow.
Here is the relevant part of the render.yaml configuration:
services:
- type: web
name: langflow
runtime: docker
dockerfilePath: ./docker/render.pre-release.Dockerfile
repo: https://github.com/langflow-ai/langflow
branch: dev
healthCheckPath: /health
autoDeploy: false
envVars:
- key: LANGFLOW_DATABASE_URL
value: sqlite:////home/user/.cache/langflow/langflow.db
disk:
name: langflow-data
mountPath: /home/user/.cache/langflow
Ensure the following:
- The disk named
langflow-datais correctly set up and mounted at/home/user/.cache/langflow. - The path specified in
LANGFLOW_DATABASE_URLmatches the mount path of the disk.
If the disk is not properly mounted or the path is incorrect, the application will not be able to find the database file, leading to IO errors.
Additionally, if you encounter the error Something went wrong running migrations. Please, run 'langflow migration --fix', you may need to clear the cache by deleting the contents of the cache folder. This folder can be found at:
- Linux or WSL2 on Windows:
home/<username>/.cache/langflow/ - MacOS:
/Users/<username>/Library/Caches/langflow/
Clearing the cache removes the langflow-pre.db file but will also erase your settings. If you wish to retain your files, back them up before clearing the folder.
If the issue persists, you may need to check the Dockerfile and the application code to ensure that the database initialization and access logic are correctly implemented [1][2][3].
To continue talking to Dosu, mention @dosu.
To deploy Langflow you need 1GI of memory so the starter pack of 512MB doesn't work. We need to update the docs @carlosrcoelho
@misbahsy and @lucaseduoli Please take a look at this.