I had an unusual situation where the http request was sent without any problem, but in the meantime connection to the data base was lost for a while and program stuck on getting a response.
(gdb) thread 9
[Switching to thread 9 (Thread 0x7f6c967fc700 (LWP 2040807))]
#0 0x00007f6ca8124d36 in recv () from /lib64/libpthread.so.0
(gdb) bt
#0 0x00007f6ca8124d36 in recv () from /lib64/libpthread.so.0
#1 0x00000000005d5b51 in influxdb_cpp::detail::inner::http_request (method=method@entry=0xd5b070 "POST", uri=uri@entry=0xe83e6d "write", querystring="",
body="XXX", si=..., resp=resp@entry=0x7f6c967fbd68, timeout_sec=10)
at /opt/rh/devtoolset-11/root/usr/include/c++/11/bits/basic_string.h:4110
In the library, the timeout is set for send operation (influxdb.hpp:218):
Hello,
I had an unusual situation where the http request was sent without any problem, but in the meantime connection to the data base was lost for a while and program stuck on getting a response.
In the library, the timeout is set for send operation (influxdb.hpp:218):
but not for the receive operation (SO_RCVTIMEO flag) - root cause.
Proposed changes to solve this issue: https://github.com/orca-zhang/influxdb-cpp/pull/53
Thanks :)