CPU usage too high, SMTP status errors.
Hi, I've set up Piler but I run into the issue that my CPU usage is too high (even if I haven't indexed any mails yet) and I get some STMP status errors. For example right now I get
CPU usage: 92%
SMTP status:
piler: ERROR
smarthost: ERROR
I noticed this similar issue but none of the information there really helped me. I'm runnning Piler 0.1.23
crontab -l -u piler | grep mpstat
*/5 * * * * LC_ALL=C mpstat | tail -1 | awk '{print }' > /var/piler/stat/cpu.stat
netstat -antl
...
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
...
config-site.php
<?php
$config['SITE_NAME'] = 'mailpiler-test.X.com';
$config['SITE_URL'] = 'http://mailpiler-test.X.com/';
$config['DIR_BASE'] = '/var/www/mailpiler/';
$config['ENABLE_SYSLOG'] = 1;
$config['SMTP_DOMAIN'] = 'mailpiler-test.X.com';
$config['SMTP_FROMADDR'] = 'no-reply@mailpiler-test.X.com';
$config['ADMIN_EMAIL'] = 'admin@mailpiler-test.X.com';
$config['DB_DRIVER'] = 'mysql';
$config['DB_PREFIX'] = '';
$config['DB_HOSTNAME'] = 'localhost';
$config['DB_USERNAME'] = 'piler';
$config['DB_PASSWORD'] = Yeah, right!!;
$config['DB_DATABASE'] = 'piler';
$config['SMARTHOST'] = '';
$config['SMARTHOST_PORT'] = 25;
?>
Thank you!
Emilio.
Comments (15)
-
repo owner -
reporter Thank you for your quick answer!! The CPU usage got fixed but I still cannot get the SMTP thing right...In both SMARTHOST and PILERHOST I used the private IP I'm using for testing 10.11.2.40 does that make sense or am I missing something?
Emilio.
-
repo owner I made a typo, sorry, it's PILER_HOST. The value can be a private address, however you should set them to the same value only if the archive and the smart host are on the same computer. In this case you have to adjust the PILER_PORT and SMARTHOST_PORT
-
reporter Hi! Thanks again for your answer...I changed that but still get the error. Everything is on the same computer right now so I should have this, right?
$config['SMARTHOST'] = '10.11.2.40'; $config['SMARTHOST_PORT'] = 25; $config['PILER_HOST'] = '10.11.2.40'; $config['PILER_PORT'] = '25';
EMILIO!
-
repo owner You are almost there. However two programs can't occupy the same IP-address + port. So where does piler listen (address+port)? And where does your mail server listen (address + port)?
-
reporter So SMARTHOST is the mail server? If I check netstat it says
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2377/piler
from which I'm assuming piler is listening in the host's IP and port 25. Can I use 0.0.0.0 in config-site.php or should I use the actual IP?
Thank you very much for your kind help!
EMILIO!
-
repo owner I think the actual IP-address is better.
-
reporter So if I was using Postfix I need to set the smarthost to point to where postfix is install? Sorry if it's a silly question I'm quite a noob in this topic :P
Emilio.
-
Hi, i have the same issue with CPU usage status on health monitor page.
Here is piler cron:
crontab -l -u piler
/5 * * * LC_ALL=C mpstat | tail -1 | awk '{print $11}' > /var/piler/stat/cpu.stat
cat /var/piler/stat/cpu.stat
90.88
piler -V
piler 0.1.23, build 789, Janos SUTO sj@acts.hu
Build Date: Fri Aug 16 05:57:45 EDT 2013 ldd version: ldd (GNU libc) 2.12 gcc version: gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) Configure command: ./configure --localstatedir=/var --enable-starttls --enable-tcpwrappers
Is there any other file i have to change? Thanks.
-
repo owner A ~90 value should be fine, meaning a ~10% load. How much cpu load can you see after refreshing the health page?
-
It is 100% all the time at the health page
And it does not change at all.
I suppose it should show 10 % in green ?
-
repo owner yes, it should be ~10% or so. I recommend you to wait a little until the final 0.1.24, and it fixes this issue.
-
I fixed it by proper permissions It was:
ls -ld /var/piler/
drwx------. 7 piler piler 4096 Aug 21 13:32 /var/piler/
So just make: chmod 755 /var/piler/
-
repo owner - changed status to resolved
ahh, I fixed it a few days ago in the source tree. Thanks for sharing and fixing it.
-
hi i change my config-site.php n put : $config['SMARTHOST'] = '10.122.193.225'; $config['SMARTHOST_PORT'] = 25; $config['PILER_HOST'] = '10.122.193.226'; where 10.122.193.225 its my zimbra(postfix) 10.122.193.226 its IP of Piler but i have in smtp status: piler: ERROR smarthost: OK And if i put in PILER_HOST the ip of my zimbra(postfix) then all its OK PILER_HOST is the ip of piler???or not?? How i fix this...if PILER_HOST its the ip of piler....what i do wrong??
- Log in to comment
please fix the cronjob to have "print $11" and not only "print"
In config-site.php, please assign a value to SMARTHOST, and add
$config['PILERHOST'] = '1.2.3.4';