WebFaction
Community site: login faq
1
1

I've multidomain drupal site that starts to have quite a lot pages in it. Because our service on web315 seems a little slow today (2012-09-19 7:42 GMT), i started thinking how is memory limits configured in Webfaction's servers? And if there's a possibility that slowness comes from memory limit.

What I mean is, if my default subscription model contains 256M memory, is it automatically configured so, that my Drupal PHP process can eat it all (temporarily) if needed? There's no other applications (atm) on my subscription. Or do i need to do some php.ini configuration and/or ticket submitting my own?

It would be awesome, if WF would provide us feedback if we hit memory consumption limits, so we can react to it (with drupal: buy more memory).

asked 19 Sep '12, 02:47

Jazmo
1515
accept rate: 0%


Webfaction does not set a "hard" limit on memory usage. It's a strict limit, but it works by checking the RAM usage of every user's processes every couple of minutes, then killing all of the processes for any users who are over the limit.

For a PHP process such as Wordress, Drupal, etc, generally the memory usage does not count as your memory usage, since the processes are being run by the system-wide Apache server, not directly under your own user on the machine. However, if any request takes a long time (over a minute), then this request becomes a "php54.cgi" process under your account. This process does count against your memory limit. For efficient websites this is not usually an issue because rarely is any such process running under your account.

For a daemon-based application which runs as its own server, such as Django, Rails, Zope, etc, then this directly counts against your memory usage. This has its own benefits though, especially on CentOS 6 servers.

If your memory usage does actually exceed the limit and your processes are terminated, a new Open Issue will be created in the Control Panel, and a notification is sent via email as well. The system only sends an email notification if all previous Open Issues for the same issue are marked as resolved.

In the case of PHP, by default the memory limit is set to 128MB. However, you can change this by setting the memory_limit directive in a php.ini file. Usually if this value is set too low, PHP will usually not crash or throw errors, instead your site will behave strangely. For example, a Magento site could fail to load product images for half of the products, and for apparently no reason.

In order to determine how much memory you are using, you can use the following command (within an SSH session) to download a memory usage python script:

wget -O ~/bin/memory_usage.py 'http://wiki.webfaction.com/attachment/wiki/MiscellaneousFiles/memory_usage.py?format=raw'; chmod 755 ~/bin/memory_usage.py

Then, simply run it: memory_usage.py (or ~/bin/memory_usage.py). It will show you the total memory usage for all of your processes.

Hope that helps!

permanent link

answered 19 Sep '12, 03:30

ryans ♦♦
5.0k93159
accept rate: 43%

edited 19 Sep '12, 03:33

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×86
×63
×29

question asked: 19 Sep '12, 02:47

question was seen: 4,831 times

last updated: 19 Sep '12, 03:33

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM