Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DevilLord41 opened this issue Feb 6, 2023 · 0 comments

Comments

@DevilLord41
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant