Do you mean you are using sail?
Issue with concurrent scripts in default docker sail environment
My team and I are evaluating Laravel to determine if we can use it for our next project. The only issue holding us back is making sure session locking can be prevented (should be by default in Laravel). However, we are unable to come up with a proof of concept, and I think it has to do with the default docker environment using sail.
Our methodology to test is to create a controller with a method that reads from the session, and returns some information, and will use rand() to generate a number 1-100 and if it hits 100, will sleep for 45 seconds. We then have a javascript app running against this mini API 4 at a time making calls. The theory being that when the one gets slept, the other 3 should still run. This is not happening.
Digging deeper, I was able to come up with an easily reproduced problem that I believe is the root of this. If I make one method in that controller sleep before outputting anything (even without any session involved, using the API route, etc), and another method that doesn’t sleep and outputs text. Then I open the sleep script in Chrome and then the non-sleep script in FireFox. I would expect Chrome to spin for 45 seconds before loading, and FireFox to load instantly. Instead FireFox spins and has to wait for Chrome to finish (the 45 second sleep) before it loads.
Does anyone have any idea why this is? I assume it has something to do with the Docker setup, but I’m not familiar enough with it to troubleshoot.
Please or to participate in this conversation.