Error: Cannot allocate memory - /etc/symbiosis/monit.d/apache2 2>&1


#1

Hi,

I’ve recently setup a Bytemark 1 CPU VM using Symbioisis Jessie. I’ve put two smallish online shops on the server so far and it seems to be running well from a front of house point of view. However I’m occasionally getting emails such as this:

*** Error: Cannot allocate memory - /etc/symbiosis/monit.d/apache2 2>&1
*** For help, type: /usr/sbin/symbiosis-monit -h

Does this email suggest I am running out of RAM?

At the moment the server is running with a load average of 0.10, 0.16, 0.13.
Memory used is 81.3% of 1.0GiB

Is there anything I can do (apart from upgrading) to free up some RAM?

Thanks,
Gary


#2

Hi Gary

I’ve not seen that specific message but first up I’d try and identify the resource hog via atop or similar.

The apache logging process has been under scrutiny – see Symbiosis users Out of memory after reboot for a possible cause and (experimental) solution. I’ll be implementing the beta in the next day or two and will have a shed load of resource data for before-and-after comparison. Hopefully, I’ll have time to assemble it…


#3

Hi Gary

I can confirm that upping the RAM to 2GB cured the very same problem for me. No memory related warnings since (about 6 months now)

Regards


#4

It could be a number of things using up the memory. For me ClamAV was causing a lot of memory usage which in turn was because I had in fact been hacked.

Try installing htop - http://www.webhostingbuzz.com/wiki/install-htop-linux/ and see what tasks are using up the memory.

Also check your logs and possibly mailq to see if anything is amis. Not worth increasing memory until you know what the cause is IMO.


#5

Hi all,

Thanks for the comments. I’ve installed htop and if I sort by MEM% I see that clamd is consuming 36.6% of the memory. Is this normal? Is there anything that can be done about it?

After that mysqld is using 11.2% and everything else is below 5%.

I was alerted to memory issues due to my forum being spamed and therefore generating loads of emails that could never be delivered. That is now fixed (better spam protection and black listing a few IP address).

I do see symbiosis-httpd-logger consuming 1% for each domain, but I’ve only get 2 domains on there at the moment.

Thanks,
Gary


#6

Clamd is the Demon for ClamAV and is used to scan new files for viruses. In most cases the new files are emails being received or sent by your server. So maybe try running the mailq command and see if you have tons of mail in there. If you do you will need to find out where it is being generated. This is where it can get complicated and time consuming.


#7

Only 1 email in the mailq (I learnt all about this earlier in the week when diagnosing the forum spamming :wink: )

I do get a lot of spam emails sent to me, but these all get put in a mailbox and pop’d out by googlemail.