I'm using Craft and a DigitalOcean Spaces filesystem. On the Utilities > Asset Indexes page, I clicked "Update Asset Indexes" button. A procress started and got about 3% done before freezing (there are a large number of assets: 2700).

I clicked the "Discard" button, but it didn't do anything. I tried clicking "Update Asset Indexes" again, but it just adds another task to the queue, which it can't execute because its waiting on the first (frozen) one to finish.

In /storage/logs/queue.log, these errors/warnings are showing up:

[queue.ERROR] [craft\queue\QueueLogBehavior::afterError]  [56071] t9n:["app","Generating pending image transforms"] (attempt: 1, pid: 1646408) - Error (time: 22.829s): SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
[queue.WARNING] [craft\elements\db\ElementQuery::prepare] Element query executed before Craft is fully initialized.

Here are a handful of settings in my php.ini that seem relevant:

memory_limit         512M
post_max_size        8M
upload_max_filesize  512M
max_execution_time   300
post_max_size        16M
max_file_uploads     64

I also have restarted php8 and my nginx server several times. 24 hours later, the process is still stuck at the same spot and I can't discard it. Any thoughts about what might be going on here and how I can resolve it?

2 Answers 2


I can offer a solution to get you unstuck, but it won't solve whatever caused it to get stuck. If you're on mysql, open mysql in your commandline of choice and then use the command show processlist;

From there you can kill stuck processes by running KILL id where id is the process' ID from the processlist. After that, you'll need to check your database setup. Check your resource usage in the DO dashboard (you might need more memory if mysql is hanging on large tasks) as well as the items Brad mentioned.


SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Unfortunately, that’s one of those generic MySQL error messages that could mean many things.

Typically when we see it, it’s because the MySQL max_allowed_packet config setting is set too low on the server, or the wait_timeout setting is. You can try bumping those up to some higher values.

If that doesn’t fix it, there are other solutions to try in the official MySQL documentation on the subject: https://dev.mysql.com/doc/refman/8.0/en/gone-away.html

Hope that helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.