FATE icon indicating copy to clipboard operation
FATE copied to clipboard

BusyError: database is locked

Open cchanzl opened this issue 5 years ago • 8 comments

When running a pipeline, ValueError is encountered and FATE stops processing the rest of the python code once the current pipeline has finished processing. See error screenshot attached.

I am unable to replicate this all the time and it happens intermittently.

Please can someone advise why this is the case.

FATE error

cchanzl avatar Jul 22 '21 14:07 cchanzl

Please don't use standalone version to train model with big data, this version is just for running demo, fast developing and testing. Use cluster version of fate instead.

mgqa34 avatar Jul 27 '21 06:07 mgqa34

Hi @mgqa34 thank you for your reply.

I am only using standalone version to develop a proof of concept for a homo sbt model with 3 parties and about 1000 data points across all parties. Is that not possible under a standalone version?

cchanzl avatar Jul 27 '21 09:07 cchanzl

I also encountered “BusyError: database is locked” when I tested with FATE-1.7.0 standalone version. This problem should be caused by the fact that fateflow uses a sqlite database backendFATE/fateflow/python/fate_flow/db/db_models.py), and set large task_cores(like >32) in config. SQLite is meant to be a lightweight database, and thus can't support a high level of concurrency. However, I still don't know where in the code this problem occurs...

liuwenxin98 avatar Nov 29 '21 07:11 liuwenxin98

I do receive the same problem as @liuwenxin98 even when running the provided examples by FATE in Standalone version. (tutorial: https://fate.readthedocs.io/en/latest/tutorial/pipeline/pipeline_tutorial_match_id/). Did anybody already solve this?

Madelon-Molhoek avatar Dec 01 '21 17:12 Madelon-Molhoek

close other database tools or disconnect SQLite, when you are using Standalone mode

gm100861 avatar Dec 18 '21 08:12 gm100861

I get the same exception "BusyError: database is locked".

Here is my solution

1.from the root dir of FATE , find python file fate_flow/utils/job_utils.py

2.find the code : return [task for task in tasks]

3. modify to below

    task_list = []
    for i  in range(0,len(tasks)):
        task_list.append(tasks[i])
    return task_list

4. add numpy in job_utils.py

import numpy as np

5. Rerun the trainning script

The modify intend to convert multithread query into singlethread query, only suit for standalone version

I do receive the same problem as @liuwenxin98 even when running the provided examples by FATE in Standalone version. (tutorial: https://fate.readthedocs.io/en/latest/tutorial/pipeline/pipeline_tutorial_match_id/). Did anybody already solve this?

PromiseChan avatar Dec 18 '21 17:12 PromiseChan

This issue has been marked as stale because it has been open for 365 days with no activity. If this issue is still relevant or if there is new information, please feel free to update or reopen it.

github-actions[bot] avatar Jul 09 '24 06:07 github-actions[bot]

This issue was closed because it has been inactive for 1 days since being marked as stale. If this issue is still relevant or if there is new information, please feel free to update or reopen it.

github-actions[bot] avatar Jul 10 '24 06:07 github-actions[bot]