On 30-10-14 14:23, Rogerio Pereira wrote:
Every 2 minutes should not be a problem, if you have a login_timeout=60
or lower.
Just changed login_timeout=30
Normally, if you kill an existing connection (RST) this is detected by
the network layer and the connection is cleaned up. Sometimes however,
if dbmail doesn't receive the RST packet, the connection will have to
timeout. If you are using a monitoring app that doesn't send a RST to
terminate a TCP session, I wonder if the app is not the problem.
I've worked quite a bit on this last year, and the only way I could test
and reproduce this behaviour was by setting up firewall rules that would
drop RST packets.
I am running APF but I am not sure it will drop RST packets. Do you think Fail2ban is a better solution?
If you find out, please let me know! But I don't think so.
Today I noticed a new "pool segfault" with the following message. I have seen this problem affecting pop3d and imapd as well in different moments.
Nov 2 16:22:46 dbmail01 kernel: [22261910.564522] pool[4764]: segfault at 49 ip 00007f655b63fa15 sp 00007f654d8b6d48 error 4 in libglib-2.0.so.0.3200.4[7f655b5cf000+f5000]
Dmail.err displays the following errors when the kernel pool crashes:
Nov 02 16:20:26 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[clientbase] client_error_cb(+127): [0x7f653c5528e0] fd [6] Connection timed out[110], 0x7f653c5528e0Nov 02 16:20:27 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[clientbase] client_error_cb(+127): [0x7f6544213000] fd [29] Connection reset by peer[104], 0x7f6544213000Nov 02 16:20:30 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[clientbase] client_error_cb(+127): [0xec43b0] fd [50] Broken pipe[32], 0xec43b0Nov 02 16:20:30 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[imap] imap_session_printf(+316): ci_write failed [Unknown error 18446744073709551615]Nov 02 16:20:33 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[clientbase] client_error_cb(+127): [0x14f0070] fd [51] Broken pipe[32], 0x14f0070Nov 02 16:20:33 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[imap] imap_session_printf(+316): ci_write failed [Unknown error 18446744073709551615]Nov 02 16:20:52 dbmail01 dbmail-imapd[4741]: [0x84d590] Error:[MailboxState] MailboxState_info(+707): SQLException: unknown errorNov 02 16:20:52 dbmail01 dbmail-imapd[4741]: [0x84d590] Alert:[libzdb] TabortHandler(+43): SQLException: unknown errorNov 02 16:20:52 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[clientbase] client_error_cb(+127): [0x105cfc0] fd [45] Broken pipe[32], 0x105cfc0Nov 02 16:20:55 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[clientbase] client_error_cb(+127): [0x1530d80] fd [51] Broken pipe[32], 0x1530d80Nov 02 16:20:55 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[imap] imap_session_printf(+316): ci_write failed [Unknown error 18446744073709551615]Nov 02 16:20:56 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[clientbase] client_error_cb(+127): [0x7f654439a4b0] fd [40] Connection reset by peer[104], 0x7f654439a4b0Nov 02 16:20:56 dbmail01 dbmail-imapd[4741]: [0x84d630] Debug:[server] dm_thread_dispatch(+217): data[0xa86ec0], user_data[(nil)]Nov 02 16:20:57 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[clientbase] client_error_cb(+127): [0xe836a0] fd [48] Broken pipe[32], 0xe836a0Nov 02 16:20:57 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[imap] imap_session_printf(+316): ci_write failed [Unknown error 18446744073709551615]Nov 02 16:21:03 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[clientbase] client_error_cb(+127): [0x1530d80] fd [39] Broken pipe[32], 0x1530d80Nov 02 16:21:03 dbmail01 dbmail-imapd[4741]: [0x84d590] Database:[db] db_con_close(+291): [0xada110] connection to poolNov 02 16:21:03 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[imap] imap_session_printf(+316): ci_write failed [Unknown error 18446744073709551615]Nov 02 16:21:13 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[clientbase] client_error_cb(+127): [0x1530d80] fd [39] Broken pipe[32], 0x1530d80Nov 02 16:21:13 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[imap] imap_session_printf(+316): ci_write failed [Unknown error 18446744073709551615]Nov 02 16:21:17 dbmail01 dbmail-imapd[4741]: [0x857a00] Debug:[imap] _ic_cb_leave(+686): handling imap session [0x14ad000] client_state [ error]Nov 02 16:22:46 dbmail01 dbmail-imapd[4741]: [0x84d540] Error:[MailboxState] MailboxState_new(+212): SQLException: unknown errorNov 02 16:22:46 dbmail01 dbmail-imapd[4741]: [0x84d540] Alert:[libzdb] TabortHandler(+43): SQLException: unknown errorAnd PostgreSQL displays the following:< 2014-11-02 16:19:40.003 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:19:40.004 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:19:40.004 BRST >LOG: unexpected EOF on client connection with an open transaction< 2014-11-02 16:19:40.004 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:19:40.005 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:19:40.005 BRST >LOG: unexpected EOF on client connection with an open transaction< 2014-11-02 16:19:40.006 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:19:40.018 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:19:40.034 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:19:40.034 BRST >LOG: unexpected EOF on client connection with an open transaction< 2014-11-02 16:19:44.994 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:20:00.154 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:20:00.478 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:21:37.662 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:21:37.680 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:21:37.680 BRST >LOG: unexpected EOF on client connection with an open transaction< 2014-11-02 16:21:38.554 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:21:54.054 BRST >LOG: could not receive data from client: Connection reset by peer< 2014-11-02 16:22:10.149 BRST >LOG: could not receive data from client: Connection reset by peer
> What changes in dbmail.conf could fix this connection leak created by
> monitoring?
Try setting a lower login_timeout in dbmail.conf
Just did it to login_timeout = 30
--
_______________________________________________ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail