Author Topic: Request timeout - Sending email with large attachment  (Read 5241 times)

Offline MischterX

  • Newbie
  • *
  • Posts: 1
Request timeout - Sending email with large attachment
« on: August 06, 2014, 06:08:35 PM »
Hello,

I am using RC 1.0.2 on my own web server with Nginx 1.6, PHP 5.6 and MySQL. My email provider allows me to send mails with max. 100MB large attachments, but I already have problems when sending mails with an 3-4MB attachment. Adding the files to the mail is working fine, but as soon as I send it, I get the message "Request timeout" and the page is still the mail composing page, but the mail is send. There seems to be a problem with moving the mail to "Send Items" after the long send process.
The RC sendmail log says, that the mail was queued. The Nginx error log, says: "upstream timed out (110: Connection timed out) while reading response header from upstream [...] upstream: "fastcgi://unix/var/run/php5-fpm.sock"".
It takes about 3-5 minutes to send a 5MB mail. I have already tried to set the php.ini "socket_timeout" to 10min and the "php execution" limit to 10min but nothing works.

Does anybody knows what to modify to make it work?

Best regards
Philipp

Offline Yoni

  • Full Member
  • ***
  • Posts: 164
    • MyRoundcube
Re: Request timeout - Sending email with large attachment
« Reply #1 on: August 07, 2014, 02:28:05 AM »
Philipp,

That looks like your fastcgi process is the one timing out. Make sure to adjust it accordingly. Also, sending a 100MB email is kind of a problem. Most providers will reject such a big message. We mitigate this limitation by implementing detach_attachments plugin . With detach_attachments, the attachment never leaves the origin server and the receiver gets a direct download link (which has a 30 days expiration date).