JoeDog / siege

Siege is an http load tester and benchmarking utility
GNU General Public License v3.0
5.9k stars 386 forks source link

[error] socket: unable to connect sock.c:282: Operation already in progress #217

Open lynomet opened 1 year ago

lynomet commented 1 year ago

I am trying to prepare for heavy website load, already optimized the open file limits and rate limit when running Siege v4.1.5 from Ubuntu 20.04 with above 1000 Concurrency users it takes 2 second to return this errors "[error] socket: unable to connect sock.c:282: Operation already in progress" any idea what;s wrong? when running with 900 Concurrency it works just fine, limit on web servers are higher the 1k

JoeDog commented 1 year ago

How large is your web server's thread pool? If you schedule 1000 simulated users and you configure the server with 256 threads, then connections are going to wait for handlers until at some point they start timing out.

On Sun, Jan 8, 2023 at 4:06 PM lynomet @.***> wrote:

When running Siege v4.1.5 from Ubuntu with above 1000 Concurrency users it takes 2 second to return this error "[error] socket: unable to connect sock.c:282: Operation already in progress" any idea what;s wrong? am trying to prepare for heavy website load, already optimized the open file limits and rate limit

— Reply to this email directly, view it on GitHub https://github.com/JoeDog/siege/issues/217, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJRHZW7UH7NH26YJFPF4MLWRMT7FANCNFSM6AAAAAATUY3PVE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Jeff Fulmer 1-717-799-8226 https://www.joedog.org/ He codes

lynomet commented 1 year ago

How large is your web server's thread pool? If you schedule 1000 simulated users and you configure the server with 256 threads, then connections are going to wait for handlers until at some point they start timing out. On Sun, Jan 8, 2023 at 4:06 PM lynomet @.> wrote: When running Siege v4.1.5 from Ubuntu with above 1000 Concurrency users it takes 2 second to return this error "[error] socket: unable to connect sock.c:282: Operation already in progress" any idea what;s wrong? am trying to prepare for heavy website load, already optimized the open file limits and rate limit — Reply to this email directly, view it on GitHub <#217>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJRHZW7UH7NH26YJFPF4MLWRMT7FANCNFSM6AAAAAATUY3PVE . You are receiving this because you are subscribed to this thread.Message ID: @.> -- Jeff Fulmer 1-717-799-8226 https://www.joedog.org/ He codes

web server limit is at 10k, it's not even hitting the web server but immediately throw "sock.c:282" error

JoeDog commented 1 year ago

Write a script which starts siege at ten, then loops and increments by ten until and run it until you start to see those errors

On Mon, Jan 9, 2023, 6:08 AM lynomet @.***> wrote:

How large is your web server's thread pool? If you schedule 1000 simulated users and you configure the server with 256 threads, then connections are going to wait for handlers until at some point they start timing out. … <#m9008169795394426300> On Sun, Jan 8, 2023 at 4:06 PM lynomet @.> wrote: When running Siege v4.1.5 from Ubuntu with above 1000 Concurrency users it takes 2 second to return this error "[error] socket: unable to connect sock.c:282: Operation already in progress" any idea what;s wrong? am trying to prepare for heavy website load, already optimized the open file limits and rate limit — Reply to this email directly, view it on GitHub <#217 https://github.com/JoeDog/siege/issues/217>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJRHZW7UH7NH26YJFPF4MLWRMT7FANCNFSM6AAAAAATUY3PVE https://github.com/notifications/unsubscribe-auth/ABJRHZW7UH7NH26YJFPF4MLWRMT7FANCNFSM6AAAAAATUY3PVE . You are receiving this because you are subscribed to this thread.Message ID: @.> -- Jeff Fulmer 1-717-799-8226 https://www.joedog.org/ He codes

web server limit is at 10k, it's not even hitting the web server but immediately throw "sock.c:282" error

— Reply to this email directly, view it on GitHub https://github.com/JoeDog/siege/issues/217#issuecomment-1375447494, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJRHZRPFZTK4I5PDPCESPTWRPWSTANCNFSM6AAAAAATUY3PVE . You are receiving this because you commented.Message ID: @.***>

lynomet commented 1 year ago

you mean by ten concurrent users, then run another Siege with ten users and so on, or something else?

JoeDog commented 1 year ago

Do something like this:

!/bin/sh

let X=10

while [ $X -lt 1010 ]; do siege -c $X -r 200 -f urls.txt let X=$X+10 done

On Mon, Jan 9, 2023 at 8:34 AM lynomet @.***> wrote:

you mean by ten concurrent users, then run another Siege with ten users and so on, or something else?

— Reply to this email directly, view it on GitHub https://github.com/JoeDog/siege/issues/217#issuecomment-1375634308, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJRHZXATGRUKK6TP5CZET3WRQHVLANCNFSM6AAAAAATUY3PVE . You are receiving this because you commented.Message ID: @.***>

-- Jeff Fulmer 1-717-799-8226 https://www.joedog.org/ He codes

lynomet commented 1 year ago

I received Failed around 490 Concurrent

JoeDog commented 1 year ago

What does this mean: web server limit is at 10k

In these situations, the most likely problem is that you have more users than threads. This might be helpful: https://ubiq.co/tech-blog/increase-max-connections-apache/

Another problem is that you're running out of file handles.

vi /etc/security/limits.conf apache soft nofile 10240 apache hard nofile 900000

And you should tune the kernel for running it. There should be plenty of guides for your version.

On Mon, Jan 9, 2023 at 11:22 AM lynomet @.***> wrote:

I received Failed around 490 Concurrent

— Reply to this email directly, view it on GitHub https://github.com/JoeDog/siege/issues/217#issuecomment-1375901172, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJRHZSGI6M4DEWNHZQUIRLWRQ3NHANCNFSM6AAAAAATUY3PVE . You are receiving this because you commented.Message ID: @.***>

-- Jeff Fulmer 1-717-799-8226 https://www.joedog.org/ He codes