PHP locale mismatch in Docker container caused silent deduplication failures in ECS
A developer discovered that despite a Dockerfile declaring fr_FR.UTF-8, PHP processes inside an AWS ECS Fargate container were actually running under the C.UTF-8 locale. This mismatch caused iconv's ASCII//TRANSLIT transliteration to fail silently, corrupting accent-stripping logic used to generate deduplication keys before Doctrine flushes. As a result, duplicate entries slipped past application-level deduplication and crashed against MySQL unique constraints at flush time. The bug was diagnosed live on a staging ECS task using ECS Exec, without a dedicated deployment. The fix replaced the locale-dependent iconv call with Symfony's String component, eliminating the dependency on LC_CTYPE entirely.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in