One similar problem I encountered was that target groups have a setting for health checks, and the load balancer will access the health check route from time to time.
If your laravel's SESSION_DRIVER
env is set to database
, then your db's sessions
table would accumulate with those health check sessions.
I'm not sure if the connection will remain for the ELB request, but I still think it might be worth looking into it. Here's a neat implementation to ignore bots' session being stored into the database with the following implementation.
https://stackoverflow.com/a/49310249/10849089
Laravel 11 has a health check route by default as mentioned here.