hessu / aprsc

aprsc, a core APRS-IS server
125 stars 40 forks source link

Uplink link dropped due to "Output buffer full" and not reconnecting #31

Closed snip closed 8 years ago

snip commented 8 years ago

Hi,

I'm facing an issue with an aprsc server is disconnected from uplink due to "Output buffer full". No problem about the disconnection, but it never reconnect to upstream. Only way to reconnect seems to restart the server.

Both servers are running: aprsc 2.0.19-g05a4d35

Thanks in advance for your help.

hessu commented 8 years ago

That's quite odd, that functionality gets used quite a lot, and there are no recent code changes right there. Is this with an unmodified aprsc version? The log excerpt was quite short, it may take at least 4 seconds before it tries to reconnect.

Can you provide a longer log file? Are there any lines mentioning "Uplink" anywhere after the disconnection ("grep -i uplink aprsc.log")?

snip commented 8 years ago

Yes, unmodified aprsc.

The only message i get about uplink is when i shutdown the server: 2016/05/28 13:10:34.784467 aprsc[26665:7fe9339da700] INFO: Signalling uplink_thread to shut down... (details sent by mail)

I have other cases in which following this type of disconnection its reconnect automatically. When it fails, the first line missing seems to be the following one: Uplink: 1 uplinks configured, 0 are connected, need to pick new

I got at least 2 times this issue so far.

hessu commented 8 years ago

Tonight I wrote a test case script with a dummy server which does not accept data, causing the uplink outbound buffer to fill up and cause a disconnection with the same error (Output buffer full). The test case waits for the server to do an automatic reconnection. I ran it for some 400 cycles and it seems to work OK.

It could be that the other bug caused some memory corruption that affected this, although it's a bit unlikely. If you see this again with v2.0.20, please bump the logging to debug level ("-e debug" instead of "-e info" for command line, set in /etc/default/aprsc for debian/ubuntu) to get some more data from the events, and provide a log file + aprsc.conf. Thank you for your patience!

snip commented 8 years ago

Thanks!

I upgraded to v2.0.20 yesterday and all seems stable for the moment. But uplink issue frequency i about one every 2 weeks. So i will update later. Thanks