[rt-users] Huge memory leaks(httpd)

Ruslan U. Zakirov cubic at acronis.ru
Thu Aug 7 08:39:41 EDT 2003


          Hello again.
Today was similar situation
    1) Mail with two *binary* attachments jpg(~200K) and mov(~4.5M)
    2) Now we got 3 new instances of this mail, but 1st with all 
attachments, 2nd without, 3rd with jpg only
    3) mailq continue to send this email because rt-mailgate returns 
EX_TEMPFAIL
I think that amount of instances grow if I didn't rm that mail.
My machine still under memory pressure.
RT config:
...
Set($MailCommand , 'sendmail');
Set($SendmailArguments , "-oi -t");
Set($UseFriendlyFromLine , 1);
Set($MaxAttachmentSize , 6000000);
...
Mysql conf:
max_allowed_packet = 16M

May be problem related to some timeout issues?
             Need your help. Ruslan.
Michael van Elst wrote:

>On Wed, Aug 06, 2003, Ruslan U. Zakirov wrote:
>
>  
>
>>Questions:
>>   1) Why rt-mailgate uses so much memory? Does it convert encodings?
>>    
>>
>
>rt-mailgate sends the raw mail via HTTP to the webserver, to do this
>it has to convert it to the 'application/x-www-form-urlencoded' format.
>
>I had a glance at the LWP modules that do this and these keep at least
>6 copies of the mail in memory plus 2 copies of the converted string,
>which is slightly larger. But seeing that rt-mailgate grew to 14 times
>the size of the mail, as you wrote, I have probably overlooked a few
>copies.
>  
>
>>   2) If mail size 5MB Base64 encoded(orig mail enc is ISO-8895-1) then 
>>what size of data will be inserted in mySQL?
>>    
>>
>
>Depends. The base64 encoded part will be decoded and shrink, if it
>is text inside it will be converted to UTF8 and grow slightly (depending
>on the number of non-ASCII characters). If it's all non-ASCII characters
>it could double in size.
>
>But I doubt that you have 5MB _text_. It's probably more like 5MB _data_
>which is therefore stored in about 3.75MB.
>
>With Postgres the situation is worse as everything is again Base64 converted
>if there is a single '\0'-Byte in the data.
>  
>
>>   3.1) $MaxAttachmentSize - it's UTF-8 Encoded or Base64 or original size?
>>    
>>
>
>AFAIK it is the size of the attachment, i.e. Base64 if the mail is
>Base64 encoded.
>  
>
>>   3.2) Should $MaxAttachmentSize(RT) be equal to 
>>max_allowed_packet(mySQL)?
>>    
>>
>
>Regarding MySQL, yes. I am not sure if "exactly equal" works, so I would
>take the safe road and set it slightly smaller to avoid overflows.
>
>Seeing the above issues of RT handling huge mails, I would set it much
>smaller. But that depends on your requirements, if you absolutely must
>handle such huge mails with RT then you have no other choice.
>
>Greetings,
>  
>





More information about the rt-users mailing list