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:
thibaud-leclere
2026-03-31 21:34:11 +02:00
parent 6a844542ad
commit a37ac1debd
3 changed files with 12 additions and 22 deletions

View File

@@ -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();
}
}
}