fix: resolve messenger worker OOM by clearing EntityManager and disabling debug
Clear Doctrine identity map after each film import to prevent memory accumulation. Run messenger with --no-debug and higher PHP memory_limit to avoid profiling overhead in dev. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace App\MessageHandler;
|
||||
|
||||
use App\Entity\Import;
|
||||
use App\Entity\Notification;
|
||||
use App\Gateway\LtbxdGateway;
|
||||
use App\Message\ImportFilmsBatchMessage;
|
||||
use App\Message\ProcessImportMessage;
|
||||
@@ -72,12 +71,6 @@ readonly class ProcessImportMessageHandler
|
||||
|
||||
$import->setStatus(Import::STATUS_FAILED);
|
||||
$this->em->flush();
|
||||
|
||||
$notification = new Notification();
|
||||
$notification->setUser($import->getUser());
|
||||
$notification->setMessage('L\'import a échoué.');
|
||||
$this->em->persist($notification);
|
||||
$this->em->flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user