What to do when a ansys.saf.glow.core.exceptions.ConflictException: {"detail":"my_method_backend is already running"} ?
I tried to restart my app, restart VSCode, kill all python processes, but I still have this issue...
Hi @Romain Lejeune
Closing the Portal UI usually kills all the servers (GLOW, Portal and Dash). When restarting the solution after that you should not be bothered by the error message you mentioned.
I assume you get this message when you open the exact project, correct? If you create a new project the error is skipped, right?
In general, this situation occurs when you have a logic on the frontend side which is not preventing concurrent calls to a transaction method. I think this multiple calls should be avoided. In order to do that I recommend a logic like that:
status = problem_setup_step.get_long_running_method_state("start_analysis").status if status == MethodStatus.Running: # Method is busy come back later else: # I can run the method again
Closing the portal UI should kill all SAF servers. Obviously this is not working in your case. I'll recommend to delete the project from the portal UI and to start a new project.
This error might raise when you call a transaction method from the client side will it is already busy. To avoid this situation, you can add some checks on the frontend side.
Say for example you started a method called start_analysis. On the frontend you can add:
start_analysis
status = problem_setup_step.get_long_running_method_state("start_analysis").status if status == MethodStatus.Running: pass else: # Trigger the method again
Thanks @Ismael Azehaf !
It was indeed an error on my code, where the same long_running transaction was called twice in a row.