AndyB
Well-known member
About once or twice a day on a very active forum I see this:
The stack trace shows:
I suspect this is a race condition as it only occurs when a large number of files are being attached.
The code at 878 is:
Perhaps the best solution to this issue is to wrap the save in a try/catch.
Thank you.
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry
The stack trace shows:
src/addons/XFMG/Pub/Controller/Media.php(878): XFMG\Service\Media\Creator->save()
I suspect this is a race condition as it only occurs when a large number of files are being attached.
The code at 878 is:
Perhaps the best solution to this issue is to wrap the save in a try/catch.
PHP:
try
{
$creator->save();
}
catch (\XF\Db\DuplicateKeyException $e) {}
Thank you.