According to this: https://curl.haxx.se/libcurl/c/CURLOPT_MAXCONNECTS.html ,
libcurl can per default keep up to 5 open persistent connections in the handle.
So as long as 5 or fewer connections are used, everything is fine.
Perhaps there should be a module option to set this to a higher value?
Exactly. We may have to have a pkg-memory array of connections related to the
connection objects. This needs to be reset if there's a config reload at some
point. The benefits are huge, so this is an important enhancement.
---
You are receiving this because you are subscribed to this thread.
The purpose of this feature is to eliminate the TCP/TLS handshake for every
query. I wouldn't think calling reset + set_options was the significant bit.
The tricky bit comes when two servers are used and the process is constantly
alternating between them. Do we need to store a 'CURL' object for
Discussed this with Daniel and in general it's ok. What I wonder is if we in
order to support this properly in the case if we access two or more servers
need to move the connection data structure somewhere else, like in process
memory but indexed on http_con objects or simply reset it if the
The current implementation uses curl_easy_init() to create a CURL easy handle
and curl_easy_cleanup() to destroy the handle, including all open connections
within it.
If curl_easy_cleanup() isn't called, it's possible to reuse an open connection
for the next http call. To reset the CURL