Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Intermittently seeing wrong port #12
On our production server, with mod_rpaf installed, we intermittently see requests where the port has been set to 443, even though the request has no
Both the server logs and PHP's
Any advice on how to debug the issue?
Managed to reproduce this issue consistently.
Run a couple of tests:
Use siege to simulate traffic. Easiest option is to run 2 simultaneous siege processes in two terminals:
Let siege run for a minute or two, then repeat the tests:
These final tests return some odd numbers in my tests. At first, instead of 1000 and 0, I get ~990 and ~10. So 99% of the requests are getting the wrong port. Some tests show 100% of requests with the wrong port.
Happy to provide more debugging information if necessary.
This is a known issue, it is caused by a race condition between threads setting the virtual host port. A simple way to work around this would be to run two virtual hosts, one for HTTPS requests, and the other for HTTP on separate ports. Currently there is no known way to fix this issue with Apache's internal design.