Fix Issue With Retrieving An Ip Adress When Under High Load. #18

Closed
opened 2025-05-11 11:51:09 +00:00 by owner · 1 comment
Owner

If there are too many clients crawling the site, the string ServerUtils::get_ip(const int client_fd) function returns "getpeername: Bad file descriptor".

If there are too many clients crawling the site, the `string ServerUtils::get_ip(const int client_fd)` function returns "getpeername: Bad file descriptor".
owner added this to the AI Tarpit project 2025-05-11 11:51:09 +00:00
Author
Owner

My system has 1024 file descriptors by default. By raising it, it will work. Do keep in mind that this error only happens under high amount of clients hammering on the server, and with a wait time of 75ms per paragraph sent to the client.

Set a higher limit with: ulimit -n 65535

My system has 1024 file descriptors by default. By raising it, it will work. Do keep in mind that this error only happens under high amount of clients hammering on the server, and with a wait time of 75ms per paragraph sent to the client. Set a higher limit with: `ulimit -n 65535`
owner closed this issue 2025-05-16 19:08:30 +00:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: owner/AI-Tarpit-Reimagined#18
No description provided.