DEV Community

ChungWei Wei
ChungWei Wei

Posted on • Originally published at kmp.tw on

[Linux] ab test Get Errors

Situation

When Use ab Command, Client & Server Return Error MSG

  • ### Server
    • ### apr_socket_recv: Connection reset by peer (104)
  • ### Client
    • ### socket: Too many open files (24)

Solutions

Server Error

$ vim /etc/sysctl.conf

net.ipv4.tcp_syncookies = 0

$ sysctl -p
Enter fullscreen mode Exit fullscreen mode

Client Error

$ ulimit -a
Enter fullscreen mode Exit fullscreen mode
-t: cpu time (seconds)              unlimited
-f: file size (blocks)              unlimited
-d: data seg size (kbytes)          unlimited
-s: stack size (kbytes)             8192
-c: core file size (blocks)         0
-m: resident set size (kbytes)      unlimited
-u: processes                       62302
-n: file descriptors                1024
-l: locked-in-memory size (kbytes)  65536
-v: address space (kbytes)          unlimited
-x: file locks                      unlimited
-i: pending signals                 62302
-q: bytes in POSIX msg queues       819200
-e: max nice                        0
-r: max rt priority                 0
-N 15:                              unlimited

Enter fullscreen mode Exit fullscreen mode

Set -n : file descriptors

ulimit -n 204800
Enter fullscreen mode Exit fullscreen mode

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs