Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using the sample recipe I am deploying a WordPress solution on EC2:

juju bootstrap --constraints "instance-type=t1.micro"
juju set-constraints instance-type=t1.micro
juju debug-log
juju deploy mysql wordpress-db
juju deploy wordpress
juju add-relation wordpress wordpress-db
juju expose wordpress

After this I point my browser to the public url and get the error:

502 Bad Gateway

Looking at the debug log I see this error:

2012-11-10 20:08:19,083 unit:wordpress/0: hook.output INFO:  * Restarting PHP5 FastCGI Process Manager php5-fpm
2012-11-10 20:08:20,267 unit:wordpress/0: hook.output INFO:!

sshing to the WordPress box, I tried restarting the php service but I get a seg fault:

ubuntu@ip-10-194-31-77:~$ sudo /etc/init.d/php5-fpm start
Segmentation fault (core dumped)

Anybody know the issue? Is there a problem with the php version and WordPress?

share|improve this question

This is probably a problem with RAM. If you look on your wordpress hosts, they're likely running out of RAM quite quickly, and probably spraying 'out of memory' errors in dmesg. Thats because the default tuning setting of single does include a lot of plugins.

If you run juju set wp-service-name tuning=bare it will use less RAM and it might be able to survive on a t1.micro. If that still doesn't work, I'd recommend filing a bug against the charm here:

And perhaps look into patching it to allow reducing the number of php5-fpm processes running or other things to save RAM in such a hyper-constrained environment.

share|improve this answer
Thanks that tuning trick seems to have fixed the issue!!! – Tyler McAdams Nov 11 '12 at 19:22
Tyler, perhaps Accept the answer then, so this doesn't appear as an "unanswered" question? – SpamapS Nov 13 '12 at 1:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.