1

I trying to send mail with PHP (engine - Drupal). But it can't send mail and write message about it in to log (nothing more that adressed). Part of /var/log/mail.err :

Feb 14 19:55:30 hivede13-3220 dovecot: master: Error: service(auth): fork() failed: Cannot allocate memory
Feb 14 19:55:30 hivede13-3220 dovecot: master: Error: service(auth): command startup failed, throttling
Feb 15 17:14:30 hivede13-3220 dovecot: master: Error: service(imap-login): fork() failed: Cannot allocate memory
Feb 15 17:14:30 hivede13-3220 dovecot: master: Error: service(imap-login): command startup failed, throttling

But free -m command after sending show next

             total       used       free     shared    buffers     cached\
             Mem:          1400       1011        388          0          0                           0
             -/+ buffers/cache:       1011        388
             Swap:            0          0          0

It's meant that 388m free for usage in applications, right? If yes - how can I improve situation?

UPD. top -b -n 1 | grep dovecot output

1689 root      16   0 21244  912  644 S  0.0  0.1   0:00.00 dovecot
1690 dovecot   18   0 12780 1024  844 S  0.0  0.1   0:00.00 anvil              

Dovecot process id - 1689, cat /proc/1689/limits output

Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            10485760             unlimited            bytes     
Max core file size        0                    unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             771811               771811               processes 
Max open files            1024                 1024                 files     
Max locked memory         32768                32768                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       771811               771811               signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                    
Max realtime priority     0                    0                    
  • Is dovecot started with resource limits? This may be done by ulimit or systemd (man systemd.exec). See cat /proc/$pid/limits – Hauke Laging Feb 16 '14 at 23:17
  • Added to post. Allegedly normal, no? – alexgauss1994 Feb 16 '14 at 23:29
  • 1
    Strange. You could attach strace to the process and have a look at the OS error: strace -p 1689 -f -e trace=process – Hauke Laging Feb 16 '14 at 23:38
  • Haven't installed strace root privilegies now. Thank, will try it later. Maybe any other ideas? – alexgauss1994 Feb 16 '14 at 23:46
  • 2
    please note that dovecot is an imap/pop server and thus unrelated to sending emails: so you might remove the info about drupal (as it might put people into the wrong direction) – umläute Feb 17 '14 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.