I am having an issue with my web application being hosted on Amazon Ec2 that is causing requests to my server to be served back to the client in the same order that they were received rather than simultaneously. The reasons this is a problem is because I have multiple users trying to use the application from the same IP Address.
First off, I have ensured session locking is not the issue by combing through the application code and using session_write_close() ASAP after writing to a session variable. IS THERE ANY REASON WHY SESSION_WRITE_CLOSE() WOULD NOT PREVENT SESSION LOCKING??
Second I did this test to try and see what was happening on the server side.
- SSHed into my console and ran sudo su, top
- Opened the web application in my browser and ran multiple requests at the same time
- Via the top window I see mysqld and multiple httpd lines firing which I believe means that the requests are being served simultaneously.
- Even after the httpd and mysqld processes are done, my browser tabs are still loading, seemingly in the order that they were started. Once one page is done, the next starts.
Is there something that I can configure for my outbound AWS networking rules that would prevent this from happening? Is there some sort of router or firewall rule that I have to set up locally? Is there a better way for me to debug this issue to see what is going on? Thanks in advance!