Hi my email appears to be broken. Well the whole server is barley responding. I can log in through ssh and look at the system.log file
sudo tail -f -n 1000 /var/log/system.log
When i do this the errors being recorded is off the scale. E.g 100's of entries per second. The errors are complaing about the database. And nobody can connect to the server. Here is some of the log
Dec 15 14:07:40 localhost imap[2207]: auxpropfunc error generic failure
Dec 15 14:07:40 localhost imap[2207]: DBERROR: opening /var/imap/mailboxes.db: Cannot allocate memory
Dec 15 14:07:40 localhost imap[2207]: DBERROR: opening /var/imap/mailboxes.db: cyrusdb error
Dec 15 14:07:40 localhost imap[2207]: Fatal error: can't read mailboxes file
Dec 15 14:07:40 localhost master[427]: service imap pid 2207 in READY state: terminated abnormally
Dec 15 14:07:40 localhost imap[2211]: auxpropfunc error generic failure
Dec 15 14:07:40 localhost imap[2211]: DBERROR: opening /var/imap/mailboxes.db: Cannot allocate memory
Dec 15 14:07:40 localhost imap[2211]: DBERROR: opening /var/imap/mailboxes.db: cyrusdb error
Dec 15 14:07:40 localhost imap[2211]: Fatal error: can't read mailboxes file
Dec 15 14:07:40 localhost master[427]: service imap pid 2211 in READY state: terminated abnormally
Dec 15 14:07:40 localhost imap[2212]: auxpropfunc error generic failure
Dec 15 14:07:40 localhost imap[2212]: DBERROR: opening /var/imap/mailboxes.db: Cannot allocate memory
Dec 15 14:07:40 localhost imap[2212]: DBERROR: opening /var/imap/mailboxes.db: cyrusdb error
Dec 15 14:07:40 localhost imap[2212]: Fatal error: can't read mailboxes file
Dec 15 14:07:40 localhost master[427]: service imap pid 2212 in READY state: terminated abnormally
Dec 15 14:07:40 localhost lmtpunix[2210]: auxpropfunc error generic failure
Dec 15 14:07:40 localhost lmtpunix[2210]: DBERROR: opening /var/imap/deliver.db: Cannot allocate memory
Dec 15 14:07:40 localhost lmtpunix[2210]: DBERROR: opening /var/imap/deliver.db: cyrusdb error
Dec 15 14:07:40 localhost lmtpunix[2210]: FATAL: lmtpd: unable to init duplicate delivery database
Dec 15 14:07:40 localhost master[427]: service lmtpunix pid 2210 in READY state: terminated abnormally
I can see there's something wrong with email but what should i do about it.
Uhm no - you need a command that will show how much memory is used and hopefully how much swap space is used. The single command is for now not the problem. It seems to me that your box has a general memory usage problem at the moment.
Found this: Quickly check Mac OS X�s virtual memory usage
Hm ok, I guess I have to pass - do not know enough about Mac OS/X, sorry. Your box seems to have free pages left, but I am not sure if it shows them including any swap space or something.
I found some list of OS/X commands (OS X commands), where there was pointed, that the command
alloc
should list used and free memory - no clue how the output looks like. Also found another graphical tool: Does my MAC need more memory?
If none of the output of the above commands/tools gives any clue, I have no more clue myself. Maybe checkout also Cyrus sites for the error you get.
Is there any system log you can also check for any entries that could relate to memory problems or loads of errors of other applications/programs?
I ran that command after a restart. Here's what i have done.
I stopped the mail service ran mailbfr -f then reconstruct -m. Then i restarted the server. Now the mail seems to be working and the /var/log/system.log file isn't going off the scale. I don't think everything is fixed however. Just waiting patiently for another memory leak. I will leave mysql and httpd off over night. That way when i come in tommorrow and find it's all ok. I can restart mysql and httpd and see if the problem comes back. Then i will know that's it my inefficient codes that is causing the problem?
Can't you help much on this. I know a similar situation from a Linux box which was running out of memory, swapping heavily and to get some more memory free just killed randomly(?) processes, until we noticed something was not responding anymore. When this happened, there were entries in /var/log/messages (no clue on OS/X) which showed all the killing and I think there were also messages about memory problems.
You can either wait if someone with OS/X knowledge hopefully answers here in this thread too - or google if there is any how-tos or something to detect and analyze a memory leak on OS/X.
Does that mean apache has memory leaks? If i try it with mysqld i get
mail:~ timgolding$ leaks mysqld
Process 18782: 40289 nodes malloced for 34878 KB
Process 18782: 0 leaks for 0 total leaked bytes.
---------- Post updated at 08:17 AM ---------- Previous update was at 01:25 AM ----------
I cleaned up some of my code. I think the memory leak was caused by tcpdf. Or might of been because i had too much of my program flow in one script. Either way everything seems to be working today. I made sure i revisited all the web pages i visited yesterday after the clean up and fingers crossed no memory leak. Thanks for your help zaxxon