Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: request backend service endpoint v1/api/retrieval , throw sql error: peewee.InterfaceError: (0, '') #4289

Open
1 task done
liyongpengs opened this issue Dec 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@liyongpengs
Copy link

Is there an existing issue for the same bug?

  • I have checked the existing issues.

RAGFlow workspace code commit ID

a5cf6fc

RAGFlow image version

v0.15.0

Other environment information

No response

Actual behavior

ragflow backend server throw exception :

Traceback (most recent call last):
File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/ragflow/api/utils/api_utils.py", line 172, in decorated_function
return func(*_args, **_kwargs)
File "/ragflow/api/apps/api_app.py", line 809, in retrieval
objs = APIToken.query(token=token)
File "/ragflow/api/db/db_models.py", line 235, in query
return [query_record for query_record in query_records]
File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 7243, in iter
self.execute()
File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 2011, in inner
return method(self, database, *args, **kwargs)
File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 2082, in execute
return self._execute(database)
File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 2255, in _execute
cursor = database.execute(self)
File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3299, in execute
return self.execute_sql(sql, params)
File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3289, in execute_sql
with exception_wrapper:
File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3059, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 192, in reraise
raise value.with_traceback(tb)
File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3291, in execute_sql
cursor.execute(sql, params or ())
File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/connections.py", line 562, in query
self._execute_command(COMMAND.COM_QUERY, sql)
File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/connections.py", line 843, in _execute_command
raise err.InterfaceError(0, "")
peewee.InterfaceError: (0, '')

Expected behavior

No response

Steps to reproduce

First, I deploying multiple ragflow server instances under the same endpoint by gunicorn.
After some time, I make requests to the backend service: v1/api/retrieval.
Then, I get a response {'code': 100, 'data': '', 'message': '0'} in front , and an exception in backend service.

Additional information

No response

@liyongpengs liyongpengs added the bug Something isn't working label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant