All posts by admin

“Unable to send email. The recipient’s public key is not available for encryption”

A client was recently having this error in the “Mail App” on their android phone after setting up with our email.  I knew it wasn’t an issue with our server, but the timing was uncanny.  This error prevented any outgoing mail, but only to certain domains, one of which was Gmail.  Eventually, I found that it goes back to an option to “encrypt all outgoing emails.”  To disable this option, and stop receiving the error  go to (in the Mail App):

settings->account settings->the account you’re having trouble with->more settings->security options

Simply uncheck “Encrypt all,” and everything should be peachy.

I suspect that setting up an email account using SSL or TLS may automatically turn this option on on some phones, though I’m not sure.

Engineyard file timeouts

Symptoms:

  • So basically, the problem was that during long video uploads, the browser would suddenly through up a “error code: ERR_CONNECTION_RESET.”
  • The rails log was not showing anything unusual, even saying that it had sent a 200 (ok) response.  This was the most confusing part.

Problem:

So basically, the problem turned out to be that *something* was timing out the the form submission ahead of rails, so that rails couldn’t get a chance to send out an error code.  This was especially elusive because of problems we had had with the paperclip gem earlier this month.    After much trial and error trying to find a timeout setting that the server would care about, I finally found that it was actually looking for the “lingering_time” (the way I found this was that I timed the time-out, and then simply searched this page for the time, ie 30s, assuming that it was still the default).

Additionally, it was restricting the size of the attachment, which is determined (at least in this case, I don’t know enough about nginx to say this is the only thing that controls it), by client_max_body_size.

Solution:
The meat of the solution was to add

client_max_body_size 0;
lingering_time 3600s;

to the appropriate nginx.conf file.  However, this not a great thing to do site wide, so if you use this solution, be sure to wrap it in as specific of a “location” as you can, eg.
location /page_where_video_is_uploaded/ {
client_max_body_size 0;
lingering_time 3600s;

###Everything else required to make your pages load, depending on your configuration###
}