ragflow
ragflow copied to clipboard
[Question]: MySQL is down after update to ragflow:nightly
Describe your problem
Title: MySQL connection issue after updating RAGFlow to nightly image (on friday 28.02.2025)
Description: After updating to the latest nightly image, RAGFlow is unable to connect to MySQL, and the MySQL container restarts unexpectedly.
- Removed the existing container:
docker rm ragflow-server - Started the service with the new nightly image: RAGFLOW_IMAGE=infiniflow/ragflow:nightly
- RAGFlow started but constantly logged MySQL connection errors: peewee.OperationalError: (2003, "Can't connect to MySQL server on 'mysql' ([Errno 111] Connection refused)")
- Rolled back to the last stable version, and RAGFlow started successfully.
- However, when navigating to the Agents tab, the same MySQL connection error appears in loop and make a lot of errors.
- Noticed that the MySQL docker container keeps restarting unexpectedly.
Observed Logs: Example from ragflow-server:
2025-03-03T10:41:09.926104968Z Traceback (most recent call last):
2025-03-03T10:41:09.926119714Z File "/ragflow/api/ragflow_server.py", line 51, in update_progress
2025-03-03T10:41:09.926124503Z DocumentService.update_progress()
2025-03-03T10:41:09.926128740Z File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3127, in inner
2025-03-03T10:41:09.926132816Z with ConnectionContext(self.db):
2025-03-03T10:41:09.926136964Z File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3122, in __enter__
2025-03-03T10:41:09.926140904Z self.db.connect()
2025-03-03T10:41:09.926145117Z File "/ragflow/.venv/lib/python3.10/site-packages/playhouse/pool.py", line 121, in connect
2025-03-03T10:41:09.926152686Z return super(PooledDatabase, self).connect(reuse_if_open)
2025-03-03T10:41:09.926157267Z File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3231, in connect
2025-03-03T10:41:09.926161246Z with __exception_wrapper__:
2025-03-03T10:41:09.926165365Z File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3059, in __exit__
2025-03-03T10:41:09.926169718Z reraise(new_type, new_type(exc_value, *exc_args), traceback)
2025-03-03T10:41:09.926173584Z File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 192, in reraise
2025-03-03T10:41:09.926177502Z raise value.with_traceback(tb)
2025-03-03T10:41:09.926181506Z File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3232, in connect
2025-03-03T10:41:09.926185932Z self._state.set_connection(self._connect())
2025-03-03T10:41:09.926190127Z File "/ragflow/.venv/lib/python3.10/site-packages/playhouse/pool.py", line 76, in inner
2025-03-03T10:41:09.926194050Z return fn(self, *args, **kwargs)
2025-03-03T10:41:09.926198083Z File "/ragflow/.venv/lib/python3.10/site-packages/playhouse/pool.py", line 169, in _connect
2025-03-03T10:41:09.926202121Z conn = super(PooledDatabase, self)._connect()
2025-03-03T10:41:09.926206097Z File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 4201, in _connect
2025-03-03T10:41:09.926210116Z conn = mysql.connect(db=self.database, autocommit=True,
2025-03-03T10:41:09.926214095Z File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/connections.py", line 361, in __init__
2025-03-03T10:41:09.926218393Z self.connect()
2025-03-03T10:41:09.926222261Z File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/connections.py", line 716, in connect
2025-03-03T10:41:09.926231066Z raise exc
2025-03-03T10:41:09.926235311Z peewee.OperationalError: (2003, "Can't connect to MySQL server on 'mysql' ([Errno 111] Connection refused)")
Mysql logs
nightly has nothing special to MySql. Weired!