-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intermittently seeing wrong port #12
Comments
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. |
I have hit same problem on my environment, too (CentOS 6.4). |
Hi, 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. |
I see. thank you for telling me the details. |
Ahh, interesting. Thanks for the response. I've been testing exactly that, splitting the virtual hosts between http and https. It didn't seem to be 100% reliable, but I'll conduct some further tests. Open to a pull request explaining the issue in the readme? |
ref. gnif/mod_rpaf#12 (comment) > 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.
Can someone please re-test this, it should be corrected. |
Closing due to inactivity, assuming fixed until told otherwise. |
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
X-Port
orX-Forwarded-Port
header, and reached apache via port 80.Both the server logs and PHP's
$_SERVER['SERVER_PORT'];
variable show 443. It happens anywhere from 3 in 20 to 12 in 20 times.Any advice on how to debug the issue?
The text was updated successfully, but these errors were encountered: