elnormous / elnormous/HTTPRequest

An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was ful

Open
#67 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
970
Forks
200
PR merge metrics
No merged PRs in 30d

Description

Im using this header to send a request to my flask (python) hosted webserver, but after alot of requests, i got this error in my flask console:
`An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full`
which is can be solve immediately after i close my c++ program that requesting to the flask server and doesnt need to restart my webserver, which is lead to assumption its a error from my c++ program. The server and the c++ program are run on the same
server,same machine.

my code in c++ are simple just this
```
try {
http::Request request{ "http://xxx.xxx.xxx.xxx:5000/gg" };
// send a get request
const auto response =
request.send("GET", "", {}, std::chrono::milliseconds{ 30000 });
result = string{ response.body.begin(), response.body.end() };

}
catch (const exception& e) {
cout << "Request failed, error: " << e.what() << '\n';
}
```

I have read [this solution](https://stackoverflow.com/questions/17167977/httpwebrequest-issue-system-lacked-sufficient-buffer-space-or-because-a-queue-w), which it said should be enable keep alive, im not sure what is the correct solution and how to solve this issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.