sipcapture / heplify-server

HEP Capture Server for HOMER
https://sipcapture.org
GNU Affero General Public License v3.0
184 stars 85 forks source link

Issue: Heplify-Server stops capturing packets #501

Closed Ay1000 closed 1 year ago

Ay1000 commented 2 years ago

Hi,

Our heplify-server is running in AKS and after a certain time it just stops capturing ( or logging) packets. We have to restart the POD to get it working again.

the logs start to show these messages: postgres.go:259: ERR write tcp x.x.x.x:52754->y.y.y.y:5432: write: connection reset by peer

indicating that heplify-server probably lost its postgres connect due to '?'.

The memory usage than also starts to increase (i expect that this is actually a side effect since packets cannot be logged into the database).

The question is, why does the postgres connection stop working. the postgres server says:

could not receive data from client: An existing connection was forcibly closed by the remote host.

Do you guys have an advice or solution for this?

Thanks

kYroL01 commented 1 year ago

Hi @Ay1000 Hard to say, but from this error postgres.go:259: ERR write tcp x.x.x.x:52754->y.y.y.y:5432: write: connection reset by peer typically means that the other end (the PostgreSQL server in this case) closed the connection unexpectedly or terminated it for some reason. On the other end the message could not receive data from client: An existing connection was forcibly closed by the remote host. says the contrary.

In this case, IMHO it could be a network problem: for some reason, the connection is lost between the two parts. It could also be a timeout: check for any timeout configurations in your PostgreSQL server or client settings. Maybe a longer period of inactivity shut the connection down. The last thing that pops up in my mind is the database load.

Reopen this issue if you find the solution or the root cause. Thank you