ModSecurity icon indicating copy to clipboard operation
ModSecurity copied to clipboard

Connection reset by peer (104)

Open 365moods opened this issue 9 years ago • 5 comments

Hi, when set ModSecurityEnabled on (turn on ModSec), A concurrent test request of more than 50 will present the following error message: apr_socket_recv: Connection reset by peer (104)

then, turn off ModSecurityEnabled off, it's ok

ModSecurity Branch: nginx_refactoring Nginx version: 1.12.0 OS: centos 6.5 CRS Branch: v2.2/master

please :-(

365moods avatar Sep 13 '17 08:09 365moods

without use any rule

365moods avatar Sep 13 '17 08:09 365moods

Solved!!

i did bench test with ab(ApacheBench) cmd, and shell cmd use -k options. so, when i use keep-alive options, i get apr_socket_recv: Connection reset by peer (104) and debug msg get Input filter: This request does not have a body.

then, without -k options, it's ok!

any ideas???

365moods avatar Sep 13 '17 09:09 365moods

There are some known issues with ModSecurity 2.9.x on Nginx. I would suggest you to try libModSecurity v3 with the Nginx-connector.

Also, it might be a good idea to update your Core Rule Set. CRS 2.2 is a bit outdated now and although it should work support for it is not guaranteed on newer versions of ModSecurity.

victorhora avatar Sep 15 '17 03:09 victorhora

@victorhora After using ModSec(version 2.9), the response time of the test result increases too much

How to optimize?

365moods avatar Sep 25 '17 08:09 365moods

@365moods Have you tried upgrading both CRS to version 3 and ModSec to v3.0-RC1 (libModSecurity)?

victorhora avatar Sep 27 '17 04:09 victorhora