<p>Fixed this by adding</p>
<pre><code>return [
    'modules' =&gt; [
        'my-module' =&gt; \modules\Module::class,
    ],
    'components' =&gt; [
        'queue' =&gt; [
            'ttr' =&gt; 3600,
        ],
    ],
];
</code></pre>
<p>to <code>config/app.php</code>.</p>

CC BY-SA 4.0
2021-08-30T13:31:07.327Z
2021-08-30T13:31:07.327Z
Johannes A. Skrivanek
<p>I try to use the <a href="https://nystudio107.com/docs/image-optimize/" rel="nofollow noreferrer">Image Optimize</a> plugin to optimize the image with default Craft Transform. There are lots of images to be optimized at the same time, I keep having the issue of server down. Here is the error message,</p>
<pre><code>The process &quot;'/usr/bin/php7.4' 'craft' 'queue/exec' '280426' '300' '1' '7380' '--color='&quot; exceeded the timeout of 300 seconds.
</code></pre>
<p><a href="https://i.sstatic.net/KahKj.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/KahKj.png" alt="enter image description here" /></a></p>
<p>I have installed the <a href="https://github.com/ostark/craft-async-queue" rel="nofollow noreferrer">Async (Background) Queue</a>, but doesn't seems to be helpful.</p>
<p>Is there any solution for this?</p>
<p>Craft: 3.6.13</p>
<p>Image Optimize: 1.6.33</p>

CC BY-SA 4.0
2021-06-01T07:22:39.047Z
Did you configure the plugin [as per the documentation](https://github.com/ostark/craft-async-queue#configuration-optional) as well as setting `'runQueueAutomatically' => false` in your `config/general.php` ([docs](https://craftcms.com/docs/3.x/config/config-settings.html#runqueueautomatically))?
Oli
CC BY-SA 4.0
2021-06-01T08:11:43.500Z
The server is down even I add this line
Lee
CC BY-SA 4.0
2021-06-02T01:13:45.253Z
Do you have very large images, or not much CPU available? It sounds like its timing out the server, but 300 seconds is a very long time... I'm quite surprised any image transforms that need doing are not done in that timeframe. Can you give specs on your hosting?
andrew.welch
CC BY-SA 4.0
2021-06-02T01:57:13.847Z
Yes, there are lots of images to be optimized, some folders have 50+ images, some have 500+ images. Currently, I'm optimizing per folder based, but the issue still there. Yes, it used 100% of the CPU usage. Is there any way to solve this besides increasing the CPU usage?
Lee
<image><server><queue><plugin-imageoptimize><timeout>
Server down (timeout) when optimize bundle of image (Image Optimize Plugin)
# Server down (timeout) when optimize bundle of image (Image Optimize Plugin)

(Asked by: username_0 on 2021-06-01)

I try to use the Image Optimize plugin to optimize the image with default Craft Transform. There are lots of images to be optimized at the same time, I keep having the issue of server down. Here is the error message,
The process "'/usr/bin/php7.4' 'craft' 'queue/exec' '280426' '300' '1' '7380' '--color='" exceeded the timeout of 300 seconds.


I have installed the Async (Background) Queue, but doesn't seems to be helpful.
Is there any solution for this?
Craft: 3.6.13
Image Optimize: 1.6.33

**Tags:** image, server, queue, plugin-imageoptimize, timeout
> **Comments:**
> **username_1**: Did you configure the plugin [as per the documentation](https://github.com/ostark/craft-async-queue#configuration-optional) as well as setting `'runQueueAutomatically' => false` in your `config/general.php` ([docs](https://craftcms.com/docs/3.x/config/config-settings.html#runqueueautomatically))?  
> **username_0**: The server is down even I add this line  
> **username_2**: Do you have very large images, or not much CPU available? It sounds like its timing out the server, but 300 seconds is a very long time... I'm quite surprised any image transforms that need doing are not done in that timeframe. Can you give specs on your hosting?  
> **username_0**: Yes, there are lots of images to be optimized, some folders have 50+ images, some have 500+ images. Currently, I'm optimizing per folder based, but the issue still there. Yes, it used 100% of the CPU usage. Is there any way to solve this besides increasing the CPU usage?  

---

## 1 answers

### Answer by username_3 on 2021-08-30. Score: 1

Fixed this by adding
return [
    'modules' => [
        'my-module' => \modules\Module::class,
    ],
    'components' => [
        'queue' => [
            'ttr' => 3600,
        ],
    ],
];

to config/app.php.


---

