We use k8s deployment as a laravel queue worker. The runtime is alpine 3.10 and php 7.3 fpm with laravel 5.6. Our resource limits are requests: 512MB and limits 1Gi.
we are running 8 replicas to offload the incoming messages from SQS and, we are using. messages to queue are dispatched via kubernetes cron jobs
php /var/www/artisan queue:work ${CHANNEL} -vvv --tries=3 --sleep=3 --timeout=3600 --memory=${MEMORY}
where CHANNEL is the queue name (SQS) and MEMORY is the memory limit passed to the laravel worker. on average each pod is always processing 170 + messages which talks to various third party apis and stuff.
problem:
intermittently our pods are restarting with an error code 139,
SIGSEGV, Segmentation fault.
This is impacting our production systems as our pods restart while there is a message in process.