Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th July 2012, 10:19
abintipl abintipl is offline
Senior Member
 
Join Date: Nov 2010
Posts: 145
Thanks: 29
Thanked 5 Times in 5 Posts
Default Email Issue

Hello,

My set up is Ispconfig3 with Debian Squeeze

For last few days, I have been noticing that my emails stop sending/receiving

Then I have to login to my admin panel & check under Monitor

1. Show Mail Queue - Most of the time I find 4 or 5 mails

2. Show Mail-warn log - Errors are

Jul 15 10:07:27 server1 amavis[2510]: (!)Net::Server: 2012/07/15-10:07:27 Bad fork [Cannot allocate memory]\n at line 166 in file /usr/share/perl5/Net/Server/PreForkSimple.pm
Jul 15 12:27:05 server1 amavis[5479]: (05479-01) (!!)file(1) utility (/usr/bin/file) FAILED: run_command: can't fork: Cannot allocate memory at /usr/sbin/amavisd-new line 3077.

3. Show Mail Error log - Errors are

Jul 15 12:27:05 server1 amavis[5479]: (05479-01) (!!)file(1) utility (/usr/bin/file) FAILED: run_command: can't fork: Cannot allocate memory at /usr/sbin/amavisd-new line 3077.

Then I always login to my Terminal & give following commands

root@server1:~# /etc/init.d/amavis restart
Stopping amavisd: (not running).
Starting amavisd: amavisd-new.
root@server1:~#

Since amavisd not running then I always try

root@server1:~# /etc/init.d/amavis start
Starting amavisd: amavisd-new.
root@server1:~#

Then I do

root@server1:~# /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting .
root@server1:~#

Then my Mail works But this problem is quite presistent for past over 2 weeks

Please advice, where could be the problem, from time to time I keep running

apt-get update as well as apt-get upgrade

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 20th July 2012, 10:39
rosehosting rosehosting is offline
Member
 
Join Date: Jun 2012
Posts: 39
Thanks: 0
Thanked 7 Times in 6 Posts
Default

Quote:
Originally Posted by abintipl View Post
2. Show Mail-warn log - Errors are

Jul 15 10:07:27 server1 amavis[2510]: (!)Net::Server: 2012/07/15-10:07:27 Bad fork [Cannot allocate memory]\n at line 166 in file /usr/share/perl5/Net/Server/PreForkSimple.pm
Jul 15 12:27:05 server1 amavis[5479]: (05479-01) (!!)file(1) utility (/usr/bin/file) FAILED: run_command: can't fork: Cannot allocate memory at /usr/sbin/amavisd-new line 3077.

3. Show Mail Error log - Errors are

Jul 15 12:27:05 server1 amavis[5479]: (05479-01) (!!)file(1) utility (/usr/bin/file) FAILED: run_command: can't fork: Cannot allocate memory at /usr/sbin/amavisd-new line 3077.
The problem looks like is that your system is running out of memory. You need to find out what is filling up the memory using free, top, ps etc....

the following one-liner will give you the top 30 most RAM hungry processes:

Code:
while read command percent rss; do if [[ "${command}" != "COMMAND" ]]; then rss="$(bc <<< "scale=2;${rss}/1024")"; fi; printf "%-26s%-8s%s\n" "${command}" "${percent}" "${rss}"; done < <(ps -A --sort -rss -o comm,pmem,rss|head -31)
Reply With Quote
  #3  
Old 20th July 2012, 11:14
abintipl abintipl is offline
Senior Member
 
Join Date: Nov 2010
Posts: 145
Thanks: 29
Thanked 5 Times in 5 Posts
Default Memory

Here is the output for memory usage



root@server1:~# free -t -m
total used free shared buffers cached
Mem: 508 478 30 0 3 53
-/+ buffers/cache: 422 86
Swap: 0 0 0
Total: 508 478 30
root@server1:~#

top - 09:12:50 up 11 days, 19:00, 1 user, load average: 0.00, 0.11, 0.08
Tasks: 94 total, 1 running, 93 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2%us, 0.0%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 521052k total, 478448k used, 42604k free, 3280k buffers
Swap: 0k total, 0k used, 0k free, 59444k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31676 root 20 0 70588 1232 492 S 1.0 0.2 0:00.34 sshd
10917 root 20 0 19072 1348 1016 R 0.3 0.3 0:00.12 top
1 root 20 0 8356 184 56 S 0.0 0.0 0:09.86 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.80 ksoftirqd/0
5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
6 root 20 0 0 0 0 S 0.0 0.0 1:31.65 events/0
7 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuset
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 xenwatch
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 xenbus
14 root 20 0 0 0 0 S 0.0 0.0 0:01.66 sync_supers
15 root 20 0 0 0 0 S 0.0 0.0 0:01.82 bdi-default
16 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/0
Reply With Quote
  #4  
Old 20th July 2012, 11:23
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

The min. recommended memory size for a full setup is 750MB, the recommende size is 2GB. You server ahs just 512MB, so its normal that processes run out of memory.

Either you increase the memory of your server or you disable some applications like the email scanner.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 20th July 2012, 12:42
abintipl abintipl is offline
Senior Member
 
Join Date: Nov 2010
Posts: 145
Thanks: 29
Thanked 5 Times in 5 Posts
Default Memory

Sir,

I have increased memory my cloud server from 512 to 756

I have restarted apachc2

Mail warn log is as under

Jul 20 08:14:53 server1 amavis[9396]: (!)Net::Server: 2012/07/20-08:14:53 Couldn't fork: [Cannot allocate memory]\n\n at line 293 in file /usr/share/perl5/Net/Server.pm
Jul 20 10:29:25 server1 dovecot: dovecot: Killed with signal 15 (by pid=12518 uid=0 code=kill)
Jul 20 10:30:02 server1 postfix/postqueue[1499]: warning: Mail system is down -- accessing queue directly
Reply With Quote
  #6  
Old 20th July 2012, 12:52
Sir Henry Sir Henry is offline
Member
 
Join Date: Jan 2012
Posts: 51
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Quote:
Swap: 0k total, 0k used, 0k free, 59444k cached
You do not have any swap space configured. Check your settings in /etc/fstab for swap space and execute 'swapon -s'.
__________________
Cheers, Sir Henry

Last edited by Sir Henry; 20th July 2012 at 12:55.
Reply With Quote
  #7  
Old 20th July 2012, 13:00
abintipl abintipl is offline
Senior Member
 
Join Date: Nov 2010
Posts: 145
Thanks: 29
Thanked 5 Times in 5 Posts
Default Memory

Sir,

It was created when I had set up server

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/xvda1 / ext3 errors=remount-ro,usrjquota=aquota.user,
grpjquota=aquota.group,jqfmt=vfsv0 0 1
~
~
~
~
~
~
~
Reply With Quote
  #8  
Old 20th July 2012, 13:06
Sir Henry Sir Henry is offline
Member
 
Join Date: Jan 2012
Posts: 51
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Did you follow the tutorial for setting up your disk partitions?

Or else why didn't you configure any swap?

Can you post the output of 'fdisk -l' please.
__________________
Cheers, Sir Henry
Reply With Quote
  #9  
Old 20th July 2012, 13:31
abintipl abintipl is offline
Senior Member
 
Join Date: Nov 2010
Posts: 145
Thanks: 29
Thanked 5 Times in 5 Posts
Default Memory

Sir,

Here is the output

root@server1:~# fdisk -l

Disk /dev/xvda1: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/xvda1 doesn't contain a valid partition table
root@server1:~#



I did follow the tutorial

http://www.howtoforge.com/perfect-se...ispconfig-3-p4

Edit /etc/fstab. Mine looks like this (I added ,usrjquota=aquota.user,grpjquota=aquota.group,jqfm t=vfsv0 to the partition with the mount point /):
Reply With Quote
  #10  
Old 20th July 2012, 14:10
Sir Henry Sir Henry is offline
Member
 
Join Date: Jan 2012
Posts: 51
Thanks: 0
Thanked 5 Times in 5 Posts
 
Default

I am afraid you deleted the swap line from /etc/fstab when you edited it.

The "Guided Method - Use entire disk" does create a swap partition, as you can see on page 2 of the tutorial.

I am not quite sure if I can help further as this might be related to virtualisation. But I wonder where your partition table is.

Please post the output of
Code:
cat /proc/partitions
and
Code:
fdisk -l /dev/xvda
Then we might see...
__________________
Cheers, Sir Henry
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix Cannot Receive Email - Smtp Timed Out newbielinx Installation/Configuration 4 26th September 2011 17:14
Sending email issue lezelf Installation/Configuration 15 9th August 2011 11:20
cant receive email, issue with user@www.domain.com Julian_Lopez Installation/Configuration 1 13th February 2009 12:15
Email Forwarding Issue crayz1 Server Operation 4 15th January 2009 13:49
Minor issue with email rabrol Installation/Configuration 3 16th November 2007 09:47


All times are GMT +2. The time now is 17:44.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.