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

ACI image

ACI.dev: The Only MCP Server Your AI Agents Need

ACI.dev’s open-source tool-use platform and Unified MCP Server turns 600+ functions into two simple MCP tools on one server—search and execute. Comes with multi-tenant auth and natural-language permission scopes. 100% open-source under Apache 2.0.

Star our GitHub!

Top comments (0)

ACI image

ACI.dev: Best Open-Source Composio Alternative (AI Agent Tooling)

100% open-source tool-use platform (backend, dev portal, integration library, SDK/MCP) that connects your AI agents to 600+ tools with multi-tenant auth, granular permissions, and access through direct function calling or a unified MCP server.

Star our GitHub!

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay