Cannot open big mails

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot open big mails

Mirko Buffoni
Hi,

I generally lurked to this list.  I'm writing to you because
I'm getting a problem which I cannot identify the cause.

I'm using roudcube-0.1-rc1, with courierimap installed together
with a qmail-toaster package.

Everything works nice, beside a point:
- an email with body bigger than 200k (i'm experiencing problems
with mails of 400 and 600k) when opened gives a black page.

All other mails (tiny) open correctly.

What could it be the cause?  cannot rc handle mails with big
body content?

Thank you for your hints.

Mirko

_______________________________________________
List info: http://lists.roundcube.net/dev/
tfk
Reply | Threaded
Open this post in threaded view
|

Re: Cannot open big mails

tfk
On 8/23/07, Mirko Buffoni <[hidden email]> wrote:

> Hi,
>
> I generally lurked to this list.  I'm writing to you because
> I'm getting a problem which I cannot identify the cause.
>
> I'm using roudcube-0.1-rc1, with courierimap installed together
> with a qmail-toaster package.
>
> Everything works nice, beside a point:
> - an email with body bigger than 200k (i'm experiencing problems
> with mails of 400 and 600k) when opened gives a black page.
>
> All other mails (tiny) open correctly.
>
> What could it be the cause?  cannot rc handle mails with big
> body content?
>
> Thank you for your hints.

1) Enable logging (config/main)
2) Then open one of your big emails and check logs/error (tail -f ...)
3) Then you probably need to finetune settings (memory_limit, etc.) in php.ini


Cheers,
Till
_______________________________________________
List info: http://lists.roundcube.net/dev/
Reply | Threaded
Open this post in threaded view
|

Re: Cannot open big mails

Mirko Buffoni
In reply to this post by Mirko Buffoni

> > Thank you for your hints.
>
>1) Enable logging (config/main)
>2) Then open one of your big emails and check logs/error (tail -f ...)
>3) Then you probably need to finetune settings (memory_limit, etc.) in php.ini


You were right.

  PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried
to allocate 4210936 bytes) in .../rcwebmail/program/steps/mail/func.inc on
line 808

I adjusted memory_limit.  It's taking so much memory because the message is
preparsed and
email and web addresses are translated into <a>...</a> sequences, and I had
a lot of them because
the mail was a report.

Now, since the mail is big, how can I know if the message is sent compressed?

// set output buffering
if ($_action != 'get' && $_action != 'viewsource')
{
   // use gzip compression if supported
   if (function_exists('ob_gzhandler') && ini_get('zlib.output_compression'))
     ob_start('ob_gzhandler');
   else
     ob_start();
}

_task=mail&_action=show should include the case of compressed output,
but the message took quite some time...
how can I be sure it was transmitted compressed?

Mirko

_______________________________________________
List info: http://lists.roundcube.net/dev/
Reply | Threaded
Open this post in threaded view
|

Re: Cannot open big mails

Mirko Buffoni

>   // use gzip compression if supported
>   if (function_exists('ob_gzhandler') && ini_get('zlib.output_compression'))
>     ob_start('ob_gzhandler');

Wait a moment... shouldn't be !ini_get('zlib.output_compression') ?

It should mean:  if ob_gzhandler exists and compression hasn't been already
activated via php.ini
start ob_gzhandler...

Right now, I have zlib.output_compression = off in php.ini, but that
condition avoid to
start compression.

Mirko

_______________________________________________
List info: http://lists.roundcube.net/dev/
Reply | Threaded
Open this post in threaded view
|

Re: Cannot open big mails

Mirko Buffoni
In reply to this post by Mirko Buffoni

>   // use gzip compression if supported
>   if (function_exists('ob_gzhandler') && ini_get('zlib.output_compression'))
>     ob_start('ob_gzhandler');

After the change, things are getting better:

without compression
"GET /?_task=mail&_action=show&_uid=150&_mbox=INBOX HTTP/1.1" 200 1754763

with compression
"GET /?_task=mail&_action=show&_uid=150&_mbox=INBOX HTTP/1.1" 200 32523

Sorry for the noise...

Mirko

_______________________________________________
List info: http://lists.roundcube.net/dev/