Do not disconnect active connections.

The timeout option stops the connection if it has now finished after the
specified time, even if data transfer is underway. Switch to using a low
speed timeout instead, which stops the connection only if no data is being
transferred.

A typical case where this was hit was a slow-responding LLM generating
a large amount of text.

The high timeout value is still needed to account for long prefill times.
This commit is contained in:
Bartosz Taudul
2026-07-21 23:53:01 +02:00
parent 72b1edc39d
commit afe249b6d3
+2 -1
View File
@@ -29,7 +29,8 @@ void TracyLlmApi::SetupCurl( void* curl )
curl_easy_setopt( curl, CURLOPT_CA_CACHE_TIMEOUT, 604800L );
curl_easy_setopt( curl, CURLOPT_FOLLOWLOCATION, 1L );
curl_easy_setopt( curl, CURLOPT_CONNECTTIMEOUT, 5 );
curl_easy_setopt( curl, CURLOPT_TIMEOUT, 1200 );
curl_easy_setopt( curl, CURLOPT_LOW_SPEED_LIMIT, 1 );
curl_easy_setopt( curl, CURLOPT_LOW_SPEED_TIME, 1200 );
curl_easy_setopt( curl, CURLOPT_USERAGENT, "Tracy Profiler" );
}