<p>I have a custom job queued, which in itself writes to the logs that the thing it is doing has been done successfully, however if I check the result in &quot;Utilities&quot; &gt; &quot;Queue Manager&quot;, the it shows the job has <b>failed</b>. It shows this error text:</p>
<pre><code>The command &quot;'/usr/local/bin/php' './craft' 'queue/exec' '5610456' '3600' '1' '14' '--color='&quot; failed.

Exit Code: 255(Unknown error)

Working directory: /home/userapp

Output:
================


Error Output:
================
</code></pre>
<p>There's not much info there. I found that Yii2 Queue is starting a subprocess for the job and the error message format comes from Symfony Process its <code>ProcessFailedException</code> which uses the process output and error output, but as you can see, this is all empty.</p>
<p>Anyone knows what could be going on here? What could be exiting with a <code>255</code> exit code? Where to start debugging/digging?</p>
<p><strong>Update:</strong><br />
We have <code>craft queue/listen</code> running in the background. It will pick up the jobs and run it in a sub process, so that command you see in the error output is the command of the sub process it is running (trying to run). If I kick off other processes that run jobs, then this all goes well without any errors/failures.</p>

CC BY-SA 4.0
2024-03-19T07:00:07.017Z
Can you clarify if your queue is working otherwise? Is it just the custom job that fails? Can you also verify that the command you're trying to run works ok in a terminal?
cherrykoda
CC BY-SA 4.0
2024-03-21T09:46:54.723Z
Updated the question with some more details.
7ochem
<craft4><queue><commands>
Queue process fails with unclear error ouput
# Queue process fails with unclear error ouput

(Asked by: username_0 on 2024-03-18)

I have a custom job queued, which in itself writes to the logs that the thing it is doing has been done successfully, however if I check the result in "Utilities" > "Queue Manager", the it shows the job has failed. It shows this error text:
The command "'/usr/local/bin/php' './craft' 'queue/exec' '5610456' '3600' '1' '14' '--color='" failed.

Exit Code: 255(Unknown error)

Working directory: /home/userapp

Output:
================


Error Output:
================

There's not much info there. I found that Yii2 Queue is starting a subprocess for the job and the error message format comes from Symfony Process its ProcessFailedException which uses the process output and error output, but as you can see, this is all empty.
Anyone knows what could be going on here? What could be exiting with a 255 exit code? Where to start debugging/digging?
Update:
We have craft queue/listen running in the background. It will pick up the jobs and run it in a sub process, so that command you see in the error output is the command of the sub process it is running (trying to run). If I kick off other processes that run jobs, then this all goes well without any errors/failures.

**Tags:** craft4, queue, commands
> **Comments:**
> **username_1**: Can you clarify if your queue is working otherwise? Is it just the custom job that fails? Can you also verify that the command you're trying to run works ok in a terminal?  
> **username_0**: Updated the question with some more details.  

---

## 0 answers

