- MPS is stateless by design which means that each client request is handled independently by worker processes that are spawned, used, and recycled as needed.
- You cannot get a queue of jobs or kill a specific job via a CLI.
- The only way to stop a problematic job is indirectly by restarting the server (mps-stop / mps-restart), or using --kill -f if it is hung.
Kill single Job on MPS
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Is it possible to get a queue of jobs in Matlab Production Server and kill certain jobs (with command line setup)? I cannot find anything to it in the documentation. I don't mean to use mps-stop or mps-restart, which is of course possible. Background: I accidently ran a script which called uigetfile and the job gets stuck forever and I am not able to stop the service without --kill -f flags. I would prefer to be able to see which job is currenlty running so long and causing the issue and stop it..
0 commentaires
Réponses (1)
Samayochita
le 30 Juin 2025
Hi Jannes Klee,
I understand that you wish to identify and terminate a specific running job on MATLAB Production Server (MPS) without stopping or restarting the entire server. Specifically, you are looking for a way to kill a stuck or problematic job (e.g., a job waiting for user input like uigetfile) using command-line tools, rather than using mps-stop or --kill -f.
In MATLAB Production Server (MPS), managing individual jobs directly (such as listing, inspecting, or killing a specific job) is not supported via the command line or built-in APIs).
One possible workaround to abort long-running or stuck requests is by setting a global request timeout in main_config as follows:
--request-timeout=60
This acts on all requests/jobs rather than on a single request. This setting will automatically kill any request that runs longer than 60 seconds.
For more information please refer to the following documentation links:
mps-stop and –kill: https://www.mathworks.com/help/mps/server/mpsstop.html
request-timeout property: https://www.mathworks.com/help/mps/server/mps.configuration-properties.html#bve31j2
Hope this is helpful!
0 commentaires
Voir également
Catégories
En savoir plus sur Installation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!