Fixing alpine’s TCP timeouts

I’ve mentioned that I use alpine almost exclusively as a means of communicating around the world; mutt might be the darling of the Linux geek world, but alpine is what I prefer. It does, on the other hand, have a few annoying aspects.

The biggest one is a little difficult to explain, partly because I’m not sure why it does this. I have three or four e-mail accounts, all with GMail (yes, I know, it’s not wise), and I tend to bounce between them, depending on the situation. The “problem” occurs in that (I think) GMail allows a connection to drop when a different account is opened.

That is not a big deal; I expect as much, but alpine seems to be a little unhappy with that. Rather than just allowing an e-mail account to close, alpine gets paranoid and has a minute-long panic attack as it tries to continue to communicate with that particular account.

And so there is a 60-second hang while alpine counts out the seconds allotted to a timeout, then gives me an opportunity to break the connection. If I don’t see the offer in the five seconds it appears on the screen, I have to wait another 22 seconds for the next one to appear. And so on, and so on, until the final timeout and alpine just gives up.

None of that would really be a problem, except with three accounts open, you need to triple the amount of time it takes to acknowledge the account is closed, and regain control of alpine. So at the minimum, three minutes, at the maximum … well, however long it takes you to notice the prompt and instruct alpine to close the account.

I was willing to live with this because screen shows a visual prompt when a warning bell sounds in alpine, and if I am alert, I can jump to the other screen and kick alpine, before going back to whatever I was doing.

So, if all that explanation makes sense, the good news is that I found the “hidden” settings that cut that delay down to a matter of seconds, instead of upwards of three minutes. According to this page, setting the TCP Read Warning Timeout and the TCP Query Timeout to their minimum values cuts that lag to a smidgin.

Which I can vouch for. Now, instead of waiting a full minute for a prompt that allows me to regain control of alpine, I only have to wait 5 seconds. If I miss it, there’s another one in another 5 seconds. No longer do I have to tap my nails on the tabletop, waiting to continue typing an e-mail.

It’s possible that I’ve only found a workaround, or that there is a better and correct way to solve this problem. As it is though, this turns a rather annoying mode of behavior into a very slim blip on the irritation scale. I’m satisfied with that.

About these ads

4 Responses to “Fixing alpine’s TCP timeouts”

  1. 1 Nobody Important 2009/05/18 at 8:48 AM

    What’s wrong with Gmail? Are you saying there’s something better?

  2. 3 Adrian 2009/05/18 at 4:30 PM

    They’re not suspect, I just don’t think it’s wise to rely solely on gmail.. (For that reason, I own a gmail, hotmail and yahoo account..)

  3. 4 johnraff 2009/05/20 at 1:42 AM

    There may be some privacy issues. Try a search on gmail privacy.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Visit the Wiki!

Some recent desktops

May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF

May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games

Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers


This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,963,101 hits



Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: