【bugfix】从应用端看连接数并没有达到1W最大连接数,但是数据库堆栈中存在13800个线程,也不能创建新连接,数据库hang住。
This commit is contained in:
li_jianqiu 2022-03-28 18:55:39 +08:00
parent 7ddd053f55
commit 9fe77cc9b6
1 changed files with 5 additions and 1 deletions

View File

@ -2306,7 +2306,11 @@ bool gs_stop_query(gsocket* gsock, uint32 remote_pid)
/* get the error information of communication layer */
const char* gs_comm_strerror()
{
return mc_strerror(errno);
bool savedVal = t_thrd.int_cxt.ImmediateInterruptOK;
t_thrd.int_cxt.ImmediateInterruptOK = false;
const char *errMsg = mc_strerror(errno);
t_thrd.int_cxt.ImmediateInterruptOK = savedVal;
return errMsg;
}
/* get communication layer stream status at receiver end as a tuple for pg_comm_stream_status */