vladgh / VladGh.com-LEMP

Latest NginX, MySQL, PHP (with APC and Suhosin)
http://vladgh.com/blog/install-nginx-and-php-php-fpm-mysql-and-apc
Apache License 2.0
160 stars 41 forks source link

Configure PHP hangs on micro instance #33

Closed codearachnid closed 12 years ago

codearachnid commented 12 years ago

I have tried 4 separate micro EC2 instances with ubuntu 12.04 LTS and each time the installer hangs at "configuring php..." the latest install has been sitting at 6 hours with no change. The last valuable line in the log is:

checking for pthreads_cflags... 26537 pts/1    00:00:00 bash

then it just repeats

26537 pts/1    00:00:00 bash
26537 pts/1    00:00:00 bash
26537 pts/1    00:00:00 bash
26537 pts/1    00:00:00 bash
26537 pts/1    00:00:00 bash

Any direction as to getting a successful install would be appreciated.

vladgh commented 12 years ago

You are right, it does hang. However, I could not find a good solution for this. It has something to do with how the CPU is limited on this type of instance or maybe with the gcc compiler. The CPU on the micro instance hangs if it is used intensively (http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/concepts_micro_instances.html). I had a similar problem with the official java package. Anyway I can only recommend you start with another instance type, small for example, compile and install everything, then shut it down and change it to micro. If you use it in a more automated scenario, you could use the small instance to create a custom AMI, and start micro instances from that as needed. Hope this helps.

codearachnid commented 12 years ago

Thanks! I had a suspicion that was the issue but had not experienced this in the past on micro instances, I will definitely set it up the way you suggest. Thanks!

vladgh commented 12 years ago

I don't know what happened since yesterday, but according to my tests it works now. I use the official Ubuntu AMIs:

codearachnid commented 12 years ago

I tried it as a micro again and it hung - i switched to small, install took less than 5 mins and then booted from AMI - thanks