I don't know if this is "the" solution, but would it be an option to change your load balancing strategy to always connect to the same server for a single session? I'm not that known with the AWS load balance but it looks like they call it "stickiness" https://docs.aws.amazon.com/elasticloadbalancing/latest/application/sticky-sessions.html. It looks like you can make a session "stick" to the same server for a certain amount of time. This means that once the user connects to server A it will stay connecting to server A for a while.
Laravel file uploud problem. Aws, S3, Load Balanced with 3 Instances. only works on constant refresh.
Maybe some of you have had this problem and found a way to fix for the situation.
We are on AWS, 3 amazon Linux instances served by one load balancer. We are using Redis for cache and one large RDS server for DB.
Here is the issue we are having. Everything on the site is working great. All but uploads to the S3 using Spatie media-library package and dropzone.
When we are in the admin or our site inside any of the cruds we have built, when we try to upload, it errors out and says temp/ file not found.
I am assuming the issue is because when the user initiates an upload and hits save on the crud create or edit, it changes to another one of the instances. If we reload a couple of times, it works. I am at a loss on how to make this stop happening.
Here is a screenshot of the error. https://nimb.ws/ygSNHv
If anyone has encountered this and remembers the fix, please hit me up.
Please or to participate in this conversation.