cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop the job in Queue (RabbitMQ) ?

SOLVED

How to stop the job in Queue (RabbitMQ) ?

bin/magento catalog:image:resize

 

The resizing of product images is currently running as a queued process for over two days, and it's taking too long to complete. I want to stop it. What should I do?

 

 

 /usr/bin/php8.2 /var/www/magento/bin/magento queue:consumers:start media.storage.catalog.image.resize --single-xxxxxxx

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to stop the job in Queue (RabbitMQ) ?

To stop a running job in the queue for image resizing in Magento 2 using the command bin/magento catalog:image:resize, you typically need to interrupt the process or cancel the command. Here are the steps to achieve this:

 

Interrupt the Process:

If the catalog:image:resize command is currently running in your terminal, you can stop it by pressing Ctrl + C (or Command + C on macOS). This will send a termination signal to the running command, effectively stopping it.

 

Cancel the Command:

If the command is scheduled and running in the background, you need to find the process ID (PID) associated with it and terminate the process using the kill command. Follow these steps:

  1. First, you need to identify the PID of the running process. Run the following command to list all processes associated with catalog:image:resize:

 

Copy : ps aux

  1. Look for the process ID (PID) associated with the running catalog:image:resize command.
  2. Use the kill command to terminate the process using its PID. Replace <PID> with the actual PID of the process:

Like PID is 6064 then command will be  kill -9 6064

 

Copykill -9 <PID>

This will forcefully terminate the process associated with the given PID.

View solution in original post

2 REPLIES 2

Re: How to stop the job in Queue (RabbitMQ) ?

To stop a running job in the queue for image resizing in Magento 2 using the command bin/magento catalog:image:resize, you typically need to interrupt the process or cancel the command. Here are the steps to achieve this:

 

Interrupt the Process:

If the catalog:image:resize command is currently running in your terminal, you can stop it by pressing Ctrl + C (or Command + C on macOS). This will send a termination signal to the running command, effectively stopping it.

 

Cancel the Command:

If the command is scheduled and running in the background, you need to find the process ID (PID) associated with it and terminate the process using the kill command. Follow these steps:

  1. First, you need to identify the PID of the running process. Run the following command to list all processes associated with catalog:image:resize:

 

Copy : ps aux

  1. Look for the process ID (PID) associated with the running catalog:image:resize command.
  2. Use the kill command to terminate the process using its PID. Replace <PID> with the actual PID of the process:

Like PID is 6064 then command will be  kill -9 6064

 

Copykill -9 <PID>

This will forcefully terminate the process associated with the given PID.

Re: How to stop the job in Queue (RabbitMQ) ?

In the end, it seems I have to kill it. Even though I kill it, the process keeps spawning automatically, so I have no choice but to keep killing it