Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: users

/tmp full

 

 

DBMail users RSS feed   Index | Next | Previous | View Threaded


guntis at rixtel

Apr 22, 2009, 7:20 AM

Post #1 of 24 (1831 views)
Permalink
/tmp full

Hello,

I have a problem with dbmail on Freebsd. The situation is that dbmail
fills all the /tmp space (seems to not releasing used space/opened file)
and when it's full the imap daemon starts acting strange, postfix cant
flush new mails ... (pop daemon still works).
We have 2 installations with identical symptoms.

1. Our setup
FreeBSD 7.0-RELEASE-p7
dbmail 2.2.11
Mysql 5.0 hosted on dedicated server

The problem happen rarely (once in a few month) could be because the low
traffic volume.

#du -h /tmp
shows 88K used

#df -h /tmp
shows 89M used

# lsof | grep /tmp | grep dbmail
shows lots of open files ..

.....
dbmail-im 97091 nobody 18u VREG 0,92 82761 269 /tmp
(/dev/da0s1e)
dbmail-im 97091 nobody 19u VREG 0,92 82761 274 /tmp
(/dev/da0s1e)
dbmail-im 97091 nobody 20u VREG 0,92 1176746 275 /tmp
(/dev/da0s1e)
dbmail-im 97091 nobody 21u VREG 0,92 57917 279 /tmp
(/dev/da0s1e)
.....

summing the sizes seems to cerate these 89M


case Nr 2 is an installation for our client
FreeBSD 6.2-RELEASE-p11
dbmail 2.2.11
Mysql also hosted on other server

It takes ~ 1 week to fill the /tmp

#du -h /tmp shows 734K
# df -h /tmp shows 278M
#lsof | grep /tmp | grep dbmail
shows lots of open files
.....
dbmail-im 97519 nobody 17u VREG 0,89 12840447 69 /tmp
(/dev/ad0s1e)
dbmail-im 97519 nobody 18u VREG 0,89 9689295 72 /tmp
(/dev/ad0s1e)
dbmail-im 97519 nobody 19u VREG 0,89 327779 78 /tmp
(/dev/ad0s1e)
dbmail-im 97519 nobody 20u VREG 0,89 447281 81 /tmp
(/dev/ad0s1e)
....

The probleam was also for dbmail 2.2.10 and some earlier versions
For now we have to periodically restart dbmail-imap daemon to release
/tmp. Also i have noticed that if i restart mysql (witch is on different
server)
/tmp is also freed.

How can i be useful to help solve this problem?


Best Regards,
Guntis

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


tolik at dataxp

Apr 22, 2009, 10:26 PM

Post #2 of 24 (1783 views)
Permalink
Re: /tmp full [In reply to]

Guntis Bumburs wrote:
> Hello,
>
> I have a problem with dbmail on Freebsd. The situation is that dbmail
> fills all the /tmp space (seems to not releasing used space/opened file)
> and when it's full the imap daemon starts acting strange, postfix cant
> flush new mails ... (pop daemon still works).
> We have 2 installations with identical symptoms.
>
> 1. Our setup
> FreeBSD 7.0-RELEASE-p7
> dbmail 2.2.11
> Mysql 5.0 hosted on dedicated server
>
> The problem happen rarely (once in a few month) could be because the low
> traffic volume.
>
> #du -h /tmp
> shows 88K used
>
> #df -h /tmp
> shows 89M used
>
> # lsof | grep /tmp | grep dbmail
> shows lots of open files ..
>
> .....
> dbmail-im 97091 nobody 18u VREG 0,92 82761 269 /tmp
> (/dev/da0s1e)
> dbmail-im 97091 nobody 19u VREG 0,92 82761 274 /tmp
> (/dev/da0s1e)
> dbmail-im 97091 nobody 20u VREG 0,92 1176746 275 /tmp
> (/dev/da0s1e)
> dbmail-im 97091 nobody 21u VREG 0,92 57917 279 /tmp
> (/dev/da0s1e)
> .....
>
> summing the sizes seems to cerate these 89M
>
>
> case Nr 2 is an installation for our client
> FreeBSD 6.2-RELEASE-p11
> dbmail 2.2.11
> Mysql also hosted on other server
>
> It takes ~ 1 week to fill the /tmp
>
> #du -h /tmp shows 734K
> # df -h /tmp shows 278M
> #lsof | grep /tmp | grep dbmail
> shows lots of open files
> .....
> dbmail-im 97519 nobody 17u VREG 0,89 12840447 69 /tmp
> (/dev/ad0s1e)
> dbmail-im 97519 nobody 18u VREG 0,89 9689295 72 /tmp
> (/dev/ad0s1e)
> dbmail-im 97519 nobody 19u VREG 0,89 327779 78 /tmp
> (/dev/ad0s1e)
> dbmail-im 97519 nobody 20u VREG 0,89 447281 81 /tmp
> (/dev/ad0s1e)
> ....
>
> The probleam was also for dbmail 2.2.10 and some earlier versions
> For now we have to periodically restart dbmail-imap daemon to release
> /tmp. Also i have noticed that if i restart mysql (witch is on different
> server)
> /tmp is also freed.
>
> How can i be useful to help solve this problem?
>
>
> Best Regards,
> Guntis
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>
>
fsck /tmp
--
С уважением
Мельник Анатолий.
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


guntis at rixtel

Apr 22, 2009, 11:02 PM

Post #3 of 24 (1784 views)
Permalink
Re: /tmp full [In reply to]

Anatoly wrote:
> Guntis Bumburs wrote:
>
>> Hello,
>>
>> I have a problem with dbmail on Freebsd. The situation is that dbmail
>> fills all the /tmp space (seems to not releasing used space/opened file)
>> and when it's full the imap daemon starts acting strange, postfix cant
>> flush new mails ... (pop daemon still works).
>> We have 2 installations with identical symptoms.
>>
>> 1. Our setup
>> FreeBSD 7.0-RELEASE-p7
>> dbmail 2.2.11
>> Mysql 5.0 hosted on dedicated server
>>
>> The problem happen rarely (once in a few month) could be because the low
>> traffic volume.
>>
>> #du -h /tmp
>> shows 88K used
>>
>> #df -h /tmp
>> shows 89M used
>>
>> # lsof | grep /tmp | grep dbmail
>> shows lots of open files ..
>>
>> .....
>> dbmail-im 97091 nobody 18u VREG 0,92 82761 269 /tmp
>> (/dev/da0s1e)
>> dbmail-im 97091 nobody 19u VREG 0,92 82761 274 /tmp
>> (/dev/da0s1e)
>> dbmail-im 97091 nobody 20u VREG 0,92 1176746 275 /tmp
>> (/dev/da0s1e)
>> dbmail-im 97091 nobody 21u VREG 0,92 57917 279 /tmp
>> (/dev/da0s1e)
>> .....
>>
>> summing the sizes seems to cerate these 89M
>>
>>
>> case Nr 2 is an installation for our client
>> FreeBSD 6.2-RELEASE-p11
>> dbmail 2.2.11
>> Mysql also hosted on other server
>>
>> It takes ~ 1 week to fill the /tmp
>>
>> #du -h /tmp shows 734K
>> # df -h /tmp shows 278M
>> #lsof | grep /tmp | grep dbmail
>> shows lots of open files
>> .....
>> dbmail-im 97519 nobody 17u VREG 0,89 12840447 69 /tmp
>> (/dev/ad0s1e)
>> dbmail-im 97519 nobody 18u VREG 0,89 9689295 72 /tmp
>> (/dev/ad0s1e)
>> dbmail-im 97519 nobody 19u VREG 0,89 327779 78 /tmp
>> (/dev/ad0s1e)
>> dbmail-im 97519 nobody 20u VREG 0,89 447281 81 /tmp
>> (/dev/ad0s1e)
>> ....
>>
>> The probleam was also for dbmail 2.2.10 and some earlier versions
>> For now we have to periodically restart dbmail-imap daemon to release
>> /tmp. Also i have noticed that if i restart mysql (witch is on different
>> server)
>> /tmp is also freed.
>>
>> How can i be useful to help solve this problem?
>>
>>
>> Best Regards,
>> Guntis
>>
>> _______________________________________________
>> DBmail mailing list
>> DBmail[at]dbmail.org
>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>>
>>
>>
> fsck /tmp
>
smtp-mx1# fsck /tmp
** /dev/da0s1e (NO WRITE)
** Last Mounted on /tmp
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
UNREF FILE I=4 OWNER=nobody MODE=100600
SIZE=1356 MTIME=Apr 23 07:12 2009
CLEAR? no

UNREF FILE I=13 OWNER=nobody MODE=100600
SIZE=2586321 MTIME=Apr 23 08:41 2009
CLEAR? no

UNREF FILE I=14 OWNER=nobody MODE=100600
SIZE=3874 MTIME=Apr 23 03:03 2009
CLEAR? no
.....
.....
** Phase 5 - Check Cyl groups
104 files, 27824 used, 225991 free (199 frags, 28224 blocks, 0.1%
fragmentation)

That is not a solution. I will have to umount /tmp (i can do it by force
or stop daemons witch is using /tmp and do normal umount). By stoping
dbmail-imap the problem is resolved.
So the problems reported by fsck is the effect of problems caused by dbmail.


_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


guntis at rixtel

Apr 22, 2009, 11:58 PM

Post #4 of 24 (1786 views)
Permalink
Re: /tmp full [In reply to]

Guntis Bumburs wrote:
> Anatoly wrote:
>
>> Guntis Bumburs wrote:
>>
>>
>>> Hello,
>>>
>>> I have a problem with dbmail on Freebsd. The situation is that dbmail
>>> fills all the /tmp space (seems to not releasing used space/opened file)
>>> and when it's full the imap daemon starts acting strange, postfix cant
>>> flush new mails ... (pop daemon still works).
>>> We have 2 installations with identical symptoms.
>>>
>>> 1. Our setup
>>> FreeBSD 7.0-RELEASE-p7
>>> dbmail 2.2.11
>>> Mysql 5.0 hosted on dedicated server
>>>
>>> The problem happen rarely (once in a few month) could be because the low
>>> traffic volume.
>>>
>>> #du -h /tmp
>>> shows 88K used
>>>
>>> #df -h /tmp
>>> shows 89M used
>>>
>>> # lsof | grep /tmp | grep dbmail
>>> shows lots of open files ..
>>>
>>> .....
>>> dbmail-im 97091 nobody 18u VREG 0,92 82761 269 /tmp
>>> (/dev/da0s1e)
>>> dbmail-im 97091 nobody 19u VREG 0,92 82761 274 /tmp
>>> (/dev/da0s1e)
>>> dbmail-im 97091 nobody 20u VREG 0,92 1176746 275 /tmp
>>> (/dev/da0s1e)
>>> dbmail-im 97091 nobody 21u VREG 0,92 57917 279 /tmp
>>> (/dev/da0s1e)
>>> .....
>>>
>>> summing the sizes seems to cerate these 89M
>>>
>>>
>>> case Nr 2 is an installation for our client
>>> FreeBSD 6.2-RELEASE-p11
>>> dbmail 2.2.11
>>> Mysql also hosted on other server
>>>
>>> It takes ~ 1 week to fill the /tmp
>>>
>>> #du -h /tmp shows 734K
>>> # df -h /tmp shows 278M
>>> #lsof | grep /tmp | grep dbmail
>>> shows lots of open files
>>> .....
>>> dbmail-im 97519 nobody 17u VREG 0,89 12840447 69 /tmp
>>> (/dev/ad0s1e)
>>> dbmail-im 97519 nobody 18u VREG 0,89 9689295 72 /tmp
>>> (/dev/ad0s1e)
>>> dbmail-im 97519 nobody 19u VREG 0,89 327779 78 /tmp
>>> (/dev/ad0s1e)
>>> dbmail-im 97519 nobody 20u VREG 0,89 447281 81 /tmp
>>> (/dev/ad0s1e)
>>> ....
>>>
>>> The probleam was also for dbmail 2.2.10 and some earlier versions
>>> For now we have to periodically restart dbmail-imap daemon to release
>>> /tmp. Also i have noticed that if i restart mysql (witch is on different
>>> server)
>>> /tmp is also freed.
>>>
>>> How can i be useful to help solve this problem?
>>>
>>>
>>> Best Regards,
>>> Guntis
>>>
>>> _______________________________________________
>>> DBmail mailing list
>>> DBmail[at]dbmail.org
>>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>>>
>>>
>>>
>>>
>> fsck /tmp
>>
>>
> smtp-mx1# fsck /tmp
> ** /dev/da0s1e (NO WRITE)
> ** Last Mounted on /tmp
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> UNREF FILE I=4 OWNER=nobody MODE=100600
> SIZE=1356 MTIME=Apr 23 07:12 2009
> CLEAR? no
>
> UNREF FILE I=13 OWNER=nobody MODE=100600
> SIZE=2586321 MTIME=Apr 23 08:41 2009
> CLEAR? no
>
> UNREF FILE I=14 OWNER=nobody MODE=100600
> SIZE=3874 MTIME=Apr 23 03:03 2009
> CLEAR? no
> .....
> .....
> ** Phase 5 - Check Cyl groups
> 104 files, 27824 used, 225991 free (199 frags, 28224 blocks, 0.1%
> fragmentation)
>
> That is not a solution. I will have to umount /tmp (i can do it by force
> or stop daemons witch is using /tmp and do normal umount). By stoping
> dbmail-imap the problem is resolved.
> So the problems reported by fsck is the effect of problems caused by dbmail.
>
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>
df statistics on my client host:
http://munin.rixtel.com/studio7pro.lv/mx1.studio7pro.lv-df.html
note: on April 17th i have restarted dbmail-imap daemon that's why the
/tmp flushed
also we can note that sometimes there is some releases

Our company box:
http://munin.rixtel.com/rixtel.com/smtp-mx1.rixtel.com-df.html
there we can see that tmp is usually released and not growing so
quickly like on the client server. This could be because we have less
traffic.


_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


paul at nfg

Apr 23, 2009, 12:29 AM

Post #5 of 24 (1782 views)
Permalink
Re: /tmp full [In reply to]

Guntis,

try the attached patch if you will.

But more importantly. a reliable workaround that won't require testing
patches is to tune down the MAXCONNECTS parameter to 100 or so. This
will prevent forked children from running too long.

Guntis Bumburs wrote:
> Anatoly wrote:
>> Guntis Bumburs wrote:
>>
>>> Hello,
>>>
>>> I have a problem with dbmail on Freebsd. The situation is that dbmail
>>> fills all the /tmp space (seems to not releasing used space/opened file)
>>> and when it's full the imap daemon starts acting strange, postfix cant
>>> flush new mails ... (pop daemon still works).
>>> We have 2 installations with identical symptoms.
>>>
>>> 1. Our setup
>>> FreeBSD 7.0-RELEASE-p7
>>> dbmail 2.2.11
>>> Mysql 5.0 hosted on dedicated server
>>>
>>> The problem happen rarely (once in a few month) could be because the low
>>> traffic volume.
>>>
>>> #du -h /tmp
>>> shows 88K used
>>>
>>> #df -h /tmp
>>> shows 89M used
>>>
>>> # lsof | grep /tmp | grep dbmail
>>> shows lots of open files ..
>>>
>>> .....
>>> dbmail-im 97091 nobody 18u VREG 0,92 82761 269 /tmp
>>> (/dev/da0s1e)
>>> dbmail-im 97091 nobody 19u VREG 0,92 82761 274 /tmp
>>> (/dev/da0s1e)
>>> dbmail-im 97091 nobody 20u VREG 0,92 1176746 275 /tmp
>>> (/dev/da0s1e)
>>> dbmail-im 97091 nobody 21u VREG 0,92 57917 279 /tmp
>>> (/dev/da0s1e)
>>> .....
>>>
>>> summing the sizes seems to cerate these 89M
>>>
>>>
>>> case Nr 2 is an installation for our client
>>> FreeBSD 6.2-RELEASE-p11
>>> dbmail 2.2.11
>>> Mysql also hosted on other server
>>>
>>> It takes ~ 1 week to fill the /tmp
>>>
>>> #du -h /tmp shows 734K
>>> # df -h /tmp shows 278M
>>> #lsof | grep /tmp | grep dbmail
>>> shows lots of open files
>>> .....
>>> dbmail-im 97519 nobody 17u VREG 0,89 12840447 69 /tmp
>>> (/dev/ad0s1e)
>>> dbmail-im 97519 nobody 18u VREG 0,89 9689295 72 /tmp
>>> (/dev/ad0s1e)
>>> dbmail-im 97519 nobody 19u VREG 0,89 327779 78 /tmp
>>> (/dev/ad0s1e)
>>> dbmail-im 97519 nobody 20u VREG 0,89 447281 81 /tmp
>>> (/dev/ad0s1e)
>>> ....
>>>
>>> The probleam was also for dbmail 2.2.10 and some earlier versions
>>> For now we have to periodically restart dbmail-imap daemon to release
>>> /tmp. Also i have noticed that if i restart mysql (witch is on different
>>> server)
>>> /tmp is also freed.
>>>
>>> How can i be useful to help solve this problem?
>>>
>>>
>>> Best Regards,
>>> Guntis
>>>
>>> _______________________________________________
>>> DBmail mailing list
>>> DBmail[at]dbmail.org
>>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>>>
>>>
>>>
>> fsck /tmp
>>
> smtp-mx1# fsck /tmp
> ** /dev/da0s1e (NO WRITE)
> ** Last Mounted on /tmp
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> UNREF FILE I=4 OWNER=nobody MODE=100600
> SIZE=1356 MTIME=Apr 23 07:12 2009
> CLEAR? no
>
> UNREF FILE I=13 OWNER=nobody MODE=100600
> SIZE=2586321 MTIME=Apr 23 08:41 2009
> CLEAR? no
>
> UNREF FILE I=14 OWNER=nobody MODE=100600
> SIZE=3874 MTIME=Apr 23 03:03 2009
> CLEAR? no
> ......
> ......
> ** Phase 5 - Check Cyl groups
> 104 files, 27824 used, 225991 free (199 frags, 28224 blocks, 0.1%
> fragmentation)
>
> That is not a solution. I will have to umount /tmp (i can do it by force
> or stop daemons witch is using /tmp and do normal umount). By stoping
> dbmail-imap the problem is resolved.
> So the problems reported by fsck is the effect of problems caused by dbmail.
>
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>


--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
Attachments: 0001-prevent-filedescriptor-leakage.patch (1.97 KB)


guntis at rixtel

Apr 23, 2009, 1:27 AM

Post #6 of 24 (1781 views)
Permalink
Re: /tmp full [In reply to]

Tnx Paul,

Testing now...

Paul J Stevens wrote:
> Guntis,
>
> try the attached patch if you will.
>
> But more importantly. a reliable workaround that won't require testing
> patches is to tune down the MAXCONNECTS parameter to 100 or so. This
> will prevent forked children from running too long.
>
> Guntis Bumburs wrote:
>
>> Anatoly wrote:
>>
>>> Guntis Bumburs wrote:
>>>
>>>
>>>> Hello,
>>>>
>>>> I have a problem with dbmail on Freebsd. The situation is that dbmail
>>>> fills all the /tmp space (seems to not releasing used space/opened file)
>>>> and when it's full the imap daemon starts acting strange, postfix cant
>>>> flush new mails ... (pop daemon still works).
>>>> We have 2 installations with identical symptoms.
>>>>
>>>> 1. Our setup
>>>> FreeBSD 7.0-RELEASE-p7
>>>> dbmail 2.2.11
>>>> Mysql 5.0 hosted on dedicated server
>>>>
>>>> The problem happen rarely (once in a few month) could be because the low
>>>> traffic volume.
>>>>
>>>> #du -h /tmp
>>>> shows 88K used
>>>>
>>>> #df -h /tmp
>>>> shows 89M used
>>>>
>>>> # lsof | grep /tmp | grep dbmail
>>>> shows lots of open files ..
>>>>
>>>> .....
>>>> dbmail-im 97091 nobody 18u VREG 0,92 82761 269 /tmp
>>>> (/dev/da0s1e)
>>>> dbmail-im 97091 nobody 19u VREG 0,92 82761 274 /tmp
>>>> (/dev/da0s1e)
>>>> dbmail-im 97091 nobody 20u VREG 0,92 1176746 275 /tmp
>>>> (/dev/da0s1e)
>>>> dbmail-im 97091 nobody 21u VREG 0,92 57917 279 /tmp
>>>> (/dev/da0s1e)
>>>> .....
>>>>
>>>> summing the sizes seems to cerate these 89M
>>>>
>>>>
>>>> case Nr 2 is an installation for our client
>>>> FreeBSD 6.2-RELEASE-p11
>>>> dbmail 2.2.11
>>>> Mysql also hosted on other server
>>>>
>>>> It takes ~ 1 week to fill the /tmp
>>>>
>>>> #du -h /tmp shows 734K
>>>> # df -h /tmp shows 278M
>>>> #lsof | grep /tmp | grep dbmail
>>>> shows lots of open files
>>>> .....
>>>> dbmail-im 97519 nobody 17u VREG 0,89 12840447 69 /tmp
>>>> (/dev/ad0s1e)
>>>> dbmail-im 97519 nobody 18u VREG 0,89 9689295 72 /tmp
>>>> (/dev/ad0s1e)
>>>> dbmail-im 97519 nobody 19u VREG 0,89 327779 78 /tmp
>>>> (/dev/ad0s1e)
>>>> dbmail-im 97519 nobody 20u VREG 0,89 447281 81 /tmp
>>>> (/dev/ad0s1e)
>>>> ....
>>>>
>>>> The probleam was also for dbmail 2.2.10 and some earlier versions
>>>> For now we have to periodically restart dbmail-imap daemon to release
>>>> /tmp. Also i have noticed that if i restart mysql (witch is on different
>>>> server)
>>>> /tmp is also freed.
>>>>
>>>> How can i be useful to help solve this problem?
>>>>
>>>>
>>>> Best Regards,
>>>> Guntis
>>>>
>>>> _______________________________________________
>>>> DBmail mailing list
>>>> DBmail[at]dbmail.org
>>>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>>>>
>>>>
>>>>
>>>>
>>> fsck /tmp
>>>
>>>
>> smtp-mx1# fsck /tmp
>> ** /dev/da0s1e (NO WRITE)
>> ** Last Mounted on /tmp
>> ** Phase 1 - Check Blocks and Sizes
>> ** Phase 2 - Check Pathnames
>> ** Phase 3 - Check Connectivity
>> ** Phase 4 - Check Reference Counts
>> UNREF FILE I=4 OWNER=nobody MODE=100600
>> SIZE=1356 MTIME=Apr 23 07:12 2009
>> CLEAR? no
>>
>> UNREF FILE I=13 OWNER=nobody MODE=100600
>> SIZE=2586321 MTIME=Apr 23 08:41 2009
>> CLEAR? no
>>
>> UNREF FILE I=14 OWNER=nobody MODE=100600
>> SIZE=3874 MTIME=Apr 23 03:03 2009
>> CLEAR? no
>> ......
>> ......
>> ** Phase 5 - Check Cyl groups
>> 104 files, 27824 used, 225991 free (199 frags, 28224 blocks, 0.1%
>> fragmentation)
>>
>> That is not a solution. I will have to umount /tmp (i can do it by force
>> or stop daemons witch is using /tmp and do normal umount). By stoping
>> dbmail-imap the problem is resolved.
>> So the problems reported by fsck is the effect of problems caused by dbmail.
>>
>>
>> _______________________________________________
>> DBmail mailing list
>> DBmail[at]dbmail.org
>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>>
>>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


curtis at maurand

Apr 23, 2009, 6:18 AM

Post #7 of 24 (1779 views)
Permalink
Re: /tmp full [In reply to]

Change your tmp environment variable to point somewhere else, then
restart whichever daemons need to be restarted so that their tmp paths
are changed. then umount the folder and fsck it. then remount it and
reverse your tmp environment variable changes and restart/reload your
daemons again.

Cheers,


Paul J Stevens wrote:
> Guntis,
>
> try the attached patch if you will.
>
> But more importantly. a reliable workaround that won't require testing
> patches is to tune down the MAXCONNECTS parameter to 100 or so. This
> will prevent forked children from running too long.
>
> Guntis Bumburs wrote:
>
>> Anatoly wrote:
>>
>>> Guntis Bumburs wrote:
>>>
>>>
>>>> Hello,
>>>>
>>>> I have a problem with dbmail on Freebsd. The situation is that dbmail
>>>> fills all the /tmp space (seems to not releasing used space/opened file)
>>>> and when it's full the imap daemon starts acting strange, postfix cant
>>>> flush new mails ... (pop daemon still works).
>>>> We have 2 installations with identical symptoms.
>>>>
>>>> 1. Our setup
>>>> FreeBSD 7.0-RELEASE-p7
>>>> dbmail 2.2.11
>>>> Mysql 5.0 hosted on dedicated server
>>>>
>>>> The problem happen rarely (once in a few month) could be because the low
>>>> traffic volume.
>>>>
>>>> #du -h /tmp
>>>> shows 88K used
>>>>
>>>> #df -h /tmp
>>>> shows 89M used
>>>>
>>>> # lsof | grep /tmp | grep dbmail
>>>> shows lots of open files ..
>>>>
>>>> .....
>>>> dbmail-im 97091 nobody 18u VREG 0,92 82761 269 /tmp
>>>> (/dev/da0s1e)
>>>> dbmail-im 97091 nobody 19u VREG 0,92 82761 274 /tmp
>>>> (/dev/da0s1e)
>>>> dbmail-im 97091 nobody 20u VREG 0,92 1176746 275 /tmp
>>>> (/dev/da0s1e)
>>>> dbmail-im 97091 nobody 21u VREG 0,92 57917 279 /tmp
>>>> (/dev/da0s1e)
>>>> .....
>>>>
>>>> summing the sizes seems to cerate these 89M
>>>>
>>>>
>>>> case Nr 2 is an installation for our client
>>>> FreeBSD 6.2-RELEASE-p11
>>>> dbmail 2.2.11
>>>> Mysql also hosted on other server
>>>>
>>>> It takes ~ 1 week to fill the /tmp
>>>>
>>>> #du -h /tmp shows 734K
>>>> # df -h /tmp shows 278M
>>>> #lsof | grep /tmp | grep dbmail
>>>> shows lots of open files
>>>> .....
>>>> dbmail-im 97519 nobody 17u VREG 0,89 12840447 69 /tmp
>>>> (/dev/ad0s1e)
>>>> dbmail-im 97519 nobody 18u VREG 0,89 9689295 72 /tmp
>>>> (/dev/ad0s1e)
>>>> dbmail-im 97519 nobody 19u VREG 0,89 327779 78 /tmp
>>>> (/dev/ad0s1e)
>>>> dbmail-im 97519 nobody 20u VREG 0,89 447281 81 /tmp
>>>> (/dev/ad0s1e)
>>>> ....
>>>>
>>>> The probleam was also for dbmail 2.2.10 and some earlier versions
>>>> For now we have to periodically restart dbmail-imap daemon to release
>>>> /tmp. Also i have noticed that if i restart mysql (witch is on different
>>>> server)
>>>> /tmp is also freed.
>>>>
>>>> How can i be useful to help solve this problem?
>>>>
>>>>
>>>> Best Regards,
>>>> Guntis
>>>>
>>>> _______________________________________________
>>>> DBmail mailing list
>>>> DBmail[at]dbmail.org
>>>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>>>>
>>>>
>>>>
>>>>
>>> fsck /tmp
>>>
>>>
>> smtp-mx1# fsck /tmp
>> ** /dev/da0s1e (NO WRITE)
>> ** Last Mounted on /tmp
>> ** Phase 1 - Check Blocks and Sizes
>> ** Phase 2 - Check Pathnames
>> ** Phase 3 - Check Connectivity
>> ** Phase 4 - Check Reference Counts
>> UNREF FILE I=4 OWNER=nobody MODE=100600
>> SIZE=1356 MTIME=Apr 23 07:12 2009
>> CLEAR? no
>>
>> UNREF FILE I=13 OWNER=nobody MODE=100600
>> SIZE=2586321 MTIME=Apr 23 08:41 2009
>> CLEAR? no
>>
>> UNREF FILE I=14 OWNER=nobody MODE=100600
>> SIZE=3874 MTIME=Apr 23 03:03 2009
>> CLEAR? no
>> ......
>> ......
>> ** Phase 5 - Check Cyl groups
>> 104 files, 27824 used, 225991 free (199 frags, 28224 blocks, 0.1%
>> fragmentation)
>>
>> That is not a solution. I will have to umount /tmp (i can do it by force
>> or stop daemons witch is using /tmp and do normal umount). By stoping
>> dbmail-imap the problem is resolved.
>> So the problems reported by fsck is the effect of problems caused by dbmail.
>>
>>
>> _______________________________________________
>> DBmail mailing list
>> DBmail[at]dbmail.org
>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>>
>>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


guntis at rixtel

Apr 23, 2009, 6:37 AM

Post #8 of 24 (1782 views)
Permalink
Re: /tmp full [In reply to]

You miss the point.

The problems reported by fsck is the effect of problems caused by dbmail

I can resolve them by restarting dbmail -imap daemon and there will be
no need to run fsck because by restarting dbmail i solve unref files

Now i'm testing the patch provided by Paul. This could take a few days
to see if it works.

I see that in config by default

MAXCONNECTS = 10000

what is the benefit to have it so hight?
what would happen if i change it to Paul's suggested 100?

Curtis Maurand wrote:
>
> Change your tmp environment variable to point somewhere else, then
> restart whichever daemons need to be restarted so that their tmp paths
> are changed. then umount the folder and fsck it. then remount it and
> reverse your tmp environment variable changes and restart/reload your
> daemons again.
>
> Cheers,
>
>
> Paul J Stevens wrote:
>> Guntis,
>>
>> try the attached patch if you will.
>>
>> But more importantly. a reliable workaround that won't require testing
>> patches is to tune down the MAXCONNECTS parameter to 100 or so. This
>> will prevent forked children from running too long.
>>
>> Guntis Bumburs wrote:
>>
>>> Anatoly wrote:
>>>
>>>> Guntis Bumburs wrote:
>>>>
>>>>
>>>>> Hello,
>>>>>
>>>>> I have a problem with dbmail on Freebsd. The situation is that dbmail
>>>>> fills all the /tmp space (seems to not releasing used space/opened file)
>>>>> and when it's full the imap daemon starts acting strange, postfix cant
>>>>> flush new mails ... (pop daemon still works).
>>>>> We have 2 installations with identical symptoms.
>>>>>
>>>>> 1. Our setup
>>>>> FreeBSD 7.0-RELEASE-p7
>>>>> dbmail 2.2.11
>>>>> Mysql 5.0 hosted on dedicated server
>>>>>
>>>>> The problem happen rarely (once in a few month) could be because the low
>>>>> traffic volume.
>>>>>
>>>>> #du -h /tmp
>>>>> shows 88K used
>>>>>
>>>>> #df -h /tmp
>>>>> shows 89M used
>>>>>
>>>>> # lsof | grep /tmp | grep dbmail
>>>>> shows lots of open files ..
>>>>>
>>>>> ......
>>>>> dbmail-im 97091 nobody 18u VREG 0,92 82761 269 /tmp
>>>>> (/dev/da0s1e)
>>>>> dbmail-im 97091 nobody 19u VREG 0,92 82761 274 /tmp
>>>>> (/dev/da0s1e)
>>>>> dbmail-im 97091 nobody 20u VREG 0,92 1176746 275 /tmp
>>>>> (/dev/da0s1e)
>>>>> dbmail-im 97091 nobody 21u VREG 0,92 57917 279 /tmp
>>>>> (/dev/da0s1e)
>>>>> ......
>>>>>
>>>>> summing the sizes seems to cerate these 89M
>>>>>
>>>>>
>>>>> case Nr 2 is an installation for our client
>>>>> FreeBSD 6.2-RELEASE-p11
>>>>> dbmail 2.2.11
>>>>> Mysql also hosted on other server
>>>>>
>>>>> It takes ~ 1 week to fill the /tmp
>>>>>
>>>>> #du -h /tmp shows 734K
>>>>> # df -h /tmp shows 278M
>>>>> #lsof | grep /tmp | grep dbmail
>>>>> shows lots of open files
>>>>> ......
>>>>> dbmail-im 97519 nobody 17u VREG 0,89 12840447 69 /tmp
>>>>> (/dev/ad0s1e)
>>>>> dbmail-im 97519 nobody 18u VREG 0,89 9689295 72 /tmp
>>>>> (/dev/ad0s1e)
>>>>> dbmail-im 97519 nobody 19u VREG 0,89 327779 78 /tmp
>>>>> (/dev/ad0s1e)
>>>>> dbmail-im 97519 nobody 20u VREG 0,89 447281 81 /tmp
>>>>> (/dev/ad0s1e)
>>>>> .....
>>>>>
>>>>> The probleam was also for dbmail 2.2.10 and some earlier versions
>>>>> For now we have to periodically restart dbmail-imap daemon to release
>>>>> /tmp. Also i have noticed that if i restart mysql (witch is on different
>>>>> server)
>>>>> /tmp is also freed.
>>>>>
>>>>> How can i be useful to help solve this problem?
>>>>>
>>>>>
>>>>> Best Regards,
>>>>> Guntis
>>>>>
>>>>> _______________________________________________
>>>>> DBmail mailing list
>>>>> DBmail[at]dbmail.org
>>>>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>>>>>
>>>>>
>>>>>
>>>>>
>>>> fsck /tmp
>>>>
>>>>
>>> smtp-mx1# fsck /tmp
>>> ** /dev/da0s1e (NO WRITE)
>>> ** Last Mounted on /tmp
>>> ** Phase 1 - Check Blocks and Sizes
>>> ** Phase 2 - Check Pathnames
>>> ** Phase 3 - Check Connectivity
>>> ** Phase 4 - Check Reference Counts
>>> UNREF FILE I=4 OWNER=nobody MODE=100600
>>> SIZE=1356 MTIME=Apr 23 07:12 2009
>>> CLEAR? no
>>>
>>> UNREF FILE I=13 OWNER=nobody MODE=100600
>>> SIZE=2586321 MTIME=Apr 23 08:41 2009
>>> CLEAR? no
>>>
>>> UNREF FILE I=14 OWNER=nobody MODE=100600
>>> SIZE=3874 MTIME=Apr 23 03:03 2009
>>> CLEAR? no
>>> .......
>>> .......
>>> ** Phase 5 - Check Cyl groups
>>> 104 files, 27824 used, 225991 free (199 frags, 28224 blocks, 0.1%
>>> fragmentation)
>>>
>>> That is not a solution. I will have to umount /tmp (i can do it by force
>>> or stop daemons witch is using /tmp and do normal umount). By stoping
>>> dbmail-imap the problem is resolved.
>>> So the problems reported by fsck is the effect of problems caused by dbmail.
>>>
>>>
>>> _______________________________________________
>>> DBmail mailing list
>>> DBmail[at]dbmail.org
>>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>>>
>>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> DBmail mailing list
>> DBmail[at]dbmail.org
>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


michael.monnerie at is

Apr 23, 2009, 9:55 AM

Post #9 of 24 (1780 views)
Permalink
Re: /tmp full [In reply to]

On Donnerstag 23 April 2009 Guntis Bumburs wrote:
> MAXCONNECTS = 10000
>
> what is the benefit to have it so hight?
> what would happen if i change it to Paul's suggested 100?

A single thread will accept MAXCONNECT connections and then stop, and a
fresh one startet. Like this, all memory/disk reservations by that
thread will be freed. It has no impact except on very high loaded
servers there could be a small performance drop because of permanent
thread restarting. No need to worry. It will help to lower it.

mfg zmi
--
// Michael Monnerie, Ing.BSc ----- http://it-management.at
// Tel: 0660 / 415 65 31 .network.your.ideas.
// PGP Key: "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: AC19 F9D5 36ED CD8A EF38 500E CE14 91F7 1C12 09B4
// Keyserver: wwwkeys.eu.pgp.net Key-ID: 1C1209B4
Attachments: signature.asc (0.19 KB)


guntis at rixtel

Apr 23, 2009, 9:33 PM

Post #10 of 24 (1776 views)
Permalink
Re: /tmp full [In reply to]

Michael Monnerie wrote:
> On Donnerstag 23 April 2009 Guntis Bumburs wrote:
>
>> MAXCONNECTS = 10000
>>
>> what is the benefit to have it so hight?
>> what would happen if i change it to Paul's suggested 100?
>>
>
> A single thread will accept MAXCONNECT connections and then stop, and a
> fresh one startet. Like this, all memory/disk reservations by that
> thread will be freed. It has no impact except on very high loaded
> servers there could be a small performance drop because of permanent
> thread restarting. No need to worry. It will help to lower it.
>
> mfg zmi
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>
Thanks Michael for explanation,

i am going for MAXCONNECTS = 100.

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


andrea at brancatelli

Apr 24, 2009, 9:19 AM

Post #11 of 24 (1777 views)
Permalink
Re: /tmp full [In reply to]

it happens to me too from freebsd 6.0 'till today.

I'm doing a 2GB /tmp on every dbmail server now and sometime i restart
mysql.

It's not dbmail the problem, it's mysql. It you restart mysql, even
without restartin dbmail, everything fixes.

But it only happens with dbmail, so i would say it's a dbmail
problem :-)

Ok, sorry for the confusion; i just wanted to scream "ME TOOO!!!" :)

Il giorno 22/apr/09, alle ore 16:20, Guntis Bumburs ha scritto:

> Hello,
>
> I have a problem with dbmail on Freebsd. The situation is that dbmail
> fills all the /tmp space (seems to not releasing used space/opened
> file)
> and when it's full the imap daemon starts acting strange, postfix cant
> flush new mails ... (pop daemon still works).
> We have 2 installations with identical symptoms.
>
> 1. Our setup
> FreeBSD 7.0-RELEASE-p7
> dbmail 2.2.11
> Mysql 5.0 hosted on dedicated server
>
> The problem happen rarely (once in a few month) could be because the
> low
> traffic volume.
>
> #du -h /tmp
> shows 88K used
>
> #df -h /tmp
> shows 89M used
>
> # lsof | grep /tmp | grep dbmail
> shows lots of open files ..
>
> .....
> dbmail-im 97091 nobody 18u VREG 0,92 82761 269 /
> tmp
> (/dev/da0s1e)
> dbmail-im 97091 nobody 19u VREG 0,92 82761 274 /
> tmp
> (/dev/da0s1e)
> dbmail-im 97091 nobody 20u VREG 0,92 1176746 275 /
> tmp
> (/dev/da0s1e)
> dbmail-im 97091 nobody 21u VREG 0,92 57917 279 /
> tmp
> (/dev/da0s1e)
> .....
>
> summing the sizes seems to cerate these 89M
>
>
> case Nr 2 is an installation for our client
> FreeBSD 6.2-RELEASE-p11
> dbmail 2.2.11
> Mysql also hosted on other server
>
> It takes ~ 1 week to fill the /tmp
>
> #du -h /tmp shows 734K
> # df -h /tmp shows 278M
> #lsof | grep /tmp | grep dbmail
> shows lots of open files
> .....
> dbmail-im 97519 nobody 17u VREG 0,89 12840447 69 /
> tmp
> (/dev/ad0s1e)
> dbmail-im 97519 nobody 18u VREG 0,89 9689295 72 /
> tmp
> (/dev/ad0s1e)
> dbmail-im 97519 nobody 19u VREG 0,89 327779 78 /
> tmp
> (/dev/ad0s1e)
> dbmail-im 97519 nobody 20u VREG 0,89 447281 81 /
> tmp
> (/dev/ad0s1e)
> ....
>
> The probleam was also for dbmail 2.2.10 and some earlier versions
> For now we have to periodically restart dbmail-imap daemon to release
> /tmp. Also i have noticed that if i restart mysql (witch is on
> different
> server)
> /tmp is also freed.
>
> How can i be useful to help solve this problem?
>
>
> Best Regards,
> Guntis
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


andrea at brancatelli

Apr 24, 2009, 9:20 AM

Post #12 of 24 (1776 views)
Permalink
Re: /tmp full [In reply to]

Il giorno 23/apr/09, alle ore 07:26, Anatoly ha scritto:

>>
> fsck /tmp
> --

Useless. It happens on fresh volumes as well
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


andrea at brancatelli

Apr 24, 2009, 9:22 AM

Post #13 of 24 (1781 views)
Permalink
Re: /tmp full [In reply to]

Il giorno 23/apr/09, alle ore 15:37, Guntis Bumburs ha scritto:

> I can resolve them by restarting dbmail -imap daemon and there will be
> no need to run fsck because by restarting dbmail i solve unref files

Restarting dbmail-imapd doesn't resolve anything on my machine, I have
to restart mysql-server to free up the TMP space.
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


andrea at brancatelli

Apr 24, 2009, 9:24 AM

Post #14 of 24 (1775 views)
Permalink
Re: /tmp full [In reply to]

Just to clarify I have at least three different FreeBSD + DBMail
server under hands and it happens regulary in all three of them.

FreeBSD 6.0 on one, 6.2 on the other and 7.0 on the latter.

Different levels of mysql, different levels of dbmail.

Lowering Maxconnect in the past didn't solve the problem.
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


josh at worldhosting

Apr 26, 2009, 3:14 PM

Post #15 of 24 (1746 views)
Permalink
Re: /tmp full [In reply to]

> > I can resolve them by restarting dbmail -imap daemon and there will be
> > no need to run fsck because by restarting dbmail i solve unref files
>
> Restarting dbmail-imapd doesn't resolve anything on my machine, I have
> to restart mysql-server to free up the TMP space.

Interesting - I have dbmail 2.2.11-1etch0 installed on Debian Etch from
the packages on the http://debian.nfgd.net/debian apt source. I see this
same problem once a month on our Linux servers. To fix we restart all
dbmail processes.

I imagine that when you restart mysql-server it causes whichever dbmail
process it is that is using up the space to release it.

What I noticed is that running du -hs on the drive shows that there is
plenty of space free, so I'm thinking that somewhere a temporary file is
being deleted while still open and being written to. So the file listing
entry is deleted but the space is not made available until the file
handle is closed.

I hope this helps any with finding a solution.

Regards,
Josh.

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


guntis at rixtel

Apr 26, 2009, 10:48 PM

Post #16 of 24 (1747 views)
Permalink
/tmp full [In reply to]

Hello,

Setting MAXCONNECTS to 100 and applying the patch seems to fix the /tmp
problem.

Now there is also some decreases on /tmp usage.


_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


andrea at brancatelli

Apr 27, 2009, 10:23 AM

Post #17 of 24 (1741 views)
Permalink
Re: /tmp full [In reply to]

Il giorno lun, 27/04/2009 alle 08.14 +1000, Josh Marshall ha scritto:

> What I noticed is that running du -hs on the drive shows that there is
> plenty of space free, so I'm thinking that somewhere a temporary file is
> being deleted while still open and being written to. So the file listing
> entry is deleted but the space is not made available until the file
> handle is closed.


du shows no space being used, while df shows that there's 0% of space
free...


andrea at brancatelli

Apr 27, 2009, 10:25 AM

Post #18 of 24 (1740 views)
Permalink
Re: /tmp full [In reply to]

litio# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad1s1a 1.9G 1.1G 670M 63% /tmp

litio# /usr/local/etc/rc.d/dbmail-imapd restart
Stopping dbmail_imapd.
Waiting for PIDS: 78180, 78180.
Starting dbmail_imapd.

litio# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad1s1a 1.9G 18K 1.8G 0% /tmp


vulture at netvulture

Apr 27, 2009, 2:30 PM

Post #19 of 24 (1743 views)
Permalink
Re: /tmp full [In reply to]

A simple way to determine who is at fault is to set
tmpdir=/usr/mysql.tmp in my.cnf.

cd /usr
mkdir mysql.tmp
chown mysql:mysql mysql.tmp
vi /usr/local/etc/my.cnf
insert or change tmpdir=/usr/mysql.tmp (this does not effect the
/tmp/mysql.sock)

/usr/local/etc/rc.d/mysql-server restart
restart dbmail daemons as well.

Test for a while and report.

Also, you should be testing with the maxconnections=100 and the patch
that Paul posted a couple of days ago.

-Jon

Andrea Brancatelli wrote:
> litio# df -h
> Filesystem Size Used Avail Capacity Mounted on
> /dev/ad1s1a 1.9G 1.1G 670M 63% /tmp
>
> litio# /usr/local/etc/rc.d/dbmail-imapd restart
> Stopping dbmail_imapd.
> Waiting for PIDS: 78180, 78180.
> Starting dbmail_imapd.
>
> litio# df -h
> Filesystem Size Used Avail Capacity Mounted on
> /dev/ad1s1a 1.9G 18K 1.8G 0% /tmp
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
> ------------------------------------------------------------------------
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


josh at worldhosting

Apr 27, 2009, 3:09 PM

Post #20 of 24 (1743 views)
Permalink
Re: /tmp full [In reply to]

On Mon, 2009-04-27 at 14:30 -0700, Jonathan Feally wrote:
> A simple way to determine who is at fault is to set
> tmpdir=/usr/mysql.tmp in my.cnf.

Hi just so you know, our MySQL server is on a different server to
dbmail. And it's the dbmail servers that are getting the hard disk full.

Regards,
Josh.

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


shane at time-travellers

Apr 28, 2009, 1:23 AM

Post #21 of 24 (1741 views)
Permalink
Re: /tmp full [In reply to]

On Mon, 2009-04-27 at 19:23 +0200, Andrea Brancatelli wrote:
> Il giorno lun, 27/04/2009 alle 08.14 +1000, Josh Marshall ha scritto:
> > What I noticed is that running du -hs on the drive shows that there is
> > plenty of space free, so I'm thinking that somewhere a temporary file is
> > being deleted while still open and being written to. So the file listing
> > entry is deleted but the space is not made available until the file
> > handle is closed.
>
> du shows no space being used, while df shows that there's 0% of space
> free...

This is "normal" in Unix-land. If one deletes a file that an application
has open, the application can continue to use it indefinitely. The space
is freed up as soon as the last application closes the file.

So a quite normal way for an application that needs temporary space to
work is to create a file, open it, then delete the file. It then has a
relatively secure temporary file that it doesn't have to worry about
other applications reading or writing.

In Linux one can see this with the "lsof" command:

shane[at]shane-asus-laptop:~$ cat test.c
#include <stdio.h>
#include <unistd.h>

int main()
{
FILE *fp = fopen("/tmp/xxx", "w");
unlink("/tmp/xxx");
sleep(300);
return 0;
}

shane[at]shane-asus-laptop:~$ cc test.c
shane[at]shane-asus-laptop:~$ ./a.out &
[1] 6381
shane[at]shane-asus-laptop:~$ lsof -p 6381
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
a.out 6381 shane cwd DIR 0,29 12288 107171 /home/shane
a.out 6381 shane rtd DIR 8,6 4096 2 /
a.out 6381 shane txt REG 0,29 11034 532605 /home/shane/a.out
a.out 6381 shane mem REG 8,6 1502512 2562 /lib/libc-2.9.so
a.out 6381 shane mem REG 8,6 135680 2542 /lib/ld-2.9.so
a.out 6381 shane 0u CHR 136,1 3 /dev/pts/1
a.out 6381 shane 1u CHR 136,1 3 /dev/pts/1
a.out 6381 shane 2u CHR 136,1 3 /dev/pts/1
a.out 6381 shane 3w REG 8,6 0 532522 /tmp/xxx (deleted)
shane[at]shane-asus-laptop:~$ kill 6381
shane[at]shane-asus-laptop:~$
[1]+ Terminated ./a.out


If you do NOT specify a process ID with "lsof" then it shows the files
opened by all processes. You may want to do this as root, and then look
for files in /tmp that are deleted, and find the offending process
(which I guess we already know is dbmail-imapd).

--
Shane

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


shane at time-travellers

Apr 28, 2009, 1:24 AM

Post #22 of 24 (1739 views)
Permalink
Re: /tmp full [In reply to]

On Tue, 2009-04-28 at 08:09 +1000, Josh Marshall wrote:
> On Mon, 2009-04-27 at 14:30 -0700, Jonathan Feally wrote:
> > A simple way to determine who is at fault is to set
> > tmpdir=/usr/mysql.tmp in my.cnf.
>
> Hi just so you know, our MySQL server is on a different server to
> dbmail. And it's the dbmail servers that are getting the hard disk full.

Right. It could be the MySQL client library still... probably the
easiest way to confirm is using the "lsof" command I mentioned in
another mail though.

--
Shane

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


jake at vapourforge

Apr 28, 2009, 2:13 AM

Post #23 of 24 (1738 views)
Permalink
Re: /tmp full [In reply to]

just a quick "make it easy" suggestion
lsof | grep "/tmp"
should spit out what's open in /tmp for you (otherwise your going to get
bazillions of results)
it can take a while to get results (10-20 seconds)

Shane Kerr wrote:
> On Mon, 2009-04-27 at 19:23 +0200, Andrea Brancatelli wrote:
>
>> Il giorno lun, 27/04/2009 alle 08.14 +1000, Josh Marshall ha scritto:
>>
>>> What I noticed is that running du -hs on the drive shows that there is
>>> plenty of space free, so I'm thinking that somewhere a temporary file is
>>> being deleted while still open and being written to. So the file listing
>>> entry is deleted but the space is not made available until the file
>>> handle is closed.
>>>
>> du shows no space being used, while df shows that there's 0% of space
>> free...
>>
>
> This is "normal" in Unix-land. If one deletes a file that an application
> has open, the application can continue to use it indefinitely. The space
> is freed up as soon as the last application closes the file.
>
> So a quite normal way for an application that needs temporary space to
> work is to create a file, open it, then delete the file. It then has a
> relatively secure temporary file that it doesn't have to worry about
> other applications reading or writing.
>
> In Linux one can see this with the "lsof" command:
>
> shane[at]shane-asus-laptop:~$ cat test.c
> #include <stdio.h>
> #include <unistd.h>
>
> int main()
> {
> FILE *fp = fopen("/tmp/xxx", "w");
> unlink("/tmp/xxx");
> sleep(300);
> return 0;
> }
>
> shane[at]shane-asus-laptop:~$ cc test.c
> shane[at]shane-asus-laptop:~$ ./a.out &
> [1] 6381
> shane[at]shane-asus-laptop:~$ lsof -p 6381
> COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
> a.out 6381 shane cwd DIR 0,29 12288 107171 /home/shane
> a.out 6381 shane rtd DIR 8,6 4096 2 /
> a.out 6381 shane txt REG 0,29 11034 532605 /home/shane/a.out
> a.out 6381 shane mem REG 8,6 1502512 2562 /lib/libc-2.9.so
> a.out 6381 shane mem REG 8,6 135680 2542 /lib/ld-2.9.so
> a.out 6381 shane 0u CHR 136,1 3 /dev/pts/1
> a.out 6381 shane 1u CHR 136,1 3 /dev/pts/1
> a.out 6381 shane 2u CHR 136,1 3 /dev/pts/1
> a.out 6381 shane 3w REG 8,6 0 532522 /tmp/xxx (deleted)
> shane[at]shane-asus-laptop:~$ kill 6381
> shane[at]shane-asus-laptop:~$
> [1]+ Terminated ./a.out
>
>
> If you do NOT specify a process ID with "lsof" then it shows the files
> opened by all processes. You may want to do this as root, and then look
> for files in /tmp that are deleted, and find the offending process
> (which I guess we already know is dbmail-imapd).
>
> --
> Shane
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>


andrea at brancatelli

Apr 29, 2009, 10:36 AM

Post #24 of 24 (1725 views)
Permalink
Re: /tmp full [In reply to]

Frankly I did not exactly understood the usage of the lsof command, but
here's the output attached. Hope it gets trough.
Attachments: lsof.txt (124 KB)

DBMail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.