-
Notifications
You must be signed in to change notification settings - Fork 291
nginx-connector and 502 responses #283
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
Comments
Without more information it's not possible to be certain what is happening, however ... One thing that may be worth checking immediately is a PCRE conflict. Beginning with 1.21.5, nginx uses PCRE2 by default. Either you have to: If nothing along those lines seems promising, please provide additional information. Have a look at the bug template, which mentions things like DebugLog output (at level 9). |
Hi @martinhsv,
We compiled nginx and modsec with pcre and not pcre2 and the upload remained in a hang status and the entire nginx instance remained in hang for one minute. The strace command reports these entries repated:
The access log reported:
|
Hello @cello86 , Apologies for the delay in getting back to this. I did have a look at the debug log that you provided. There's a lot going on there. There are 26 HTTP transactions altogether: 13 OPTIONS, 5 HEAD, and 8 POST. Are all of those HTTP requests initiated from a single client action? (The timing may be consistent with that since the first and last transactions are only 436 ms apart.) The OPTIONS and HEAD transactions don't show any obvious anomalies. The first two POST transactions show normal flow (including RESPONSE_HEADERS, RESPONSE_BODY, and LOGGING). One of those two looks like it wrote to the audit log -- was there output there? And it would be interesting to know if the client received reasonable HTTP responses for both of those.) The remaining six POST transactions do not show activity after the REQUEST_BODY phase -- which is at least a symptom of what you have reported. If that is how many nginx worker processes you have, that would be consistent with your report 'and the entire nginx instance remained in hang for one minute' Did the uploaded file(s) get written to disk? A few things you could consider experimenting with or looking into:
|
Was there anything further on this? |
Hi All,
we have installed nginx 1.21.x with the latest version of nginx-connector + mod_security and we noticed that in some cases some POST requests are checked by mod_security but the client receive 502 or 499 without issues or errors into the logs.
We tried to disable the mod_sec configuration and it works fine.
Could you help us to identify the root cause of this issue?
Thanks,
Marcello
The text was updated successfully, but these errors were encountered: