Page 1 of 1

Is Bubba useless for PHP?

Posted: 16 Jun 2009, 05:30
by GettinSadda
So far I have been using my Bubba as a glorified NAS, and a slow one at that!

However, I have recently started to use it as a real server - and I have found it unusably slow.

I have written a very simple application in PHP that allows me to manually input data into a MySQL database and display that data on a web page.

Sometimes this runs slowly, but moderately acceptable for a small cheap server, but at times it can take well over a minute to display anything.

As far as I can tell the problem is related to the webserver being idle for a while - it seems that something gets unloaded and needs to be restarted from scratch if it has not been used for a few minutes.

I have installed APC and it is working, but it does not seem to prevent the long delays that happen from time to time.

Any ideas, or do I need to dust off an old PC and a copy of Ubuntu if I need my site to be usable?

Re: Is Bubba useless for PHP?

Posted: 19 Jun 2009, 10:45
by GettinSadda
I take it from the deafening silence since my initial post that this is regarded as "normal" and "acceptable" by Bubba owners and Excito staff.

Re: Is Bubba useless for PHP?

Posted: 19 Jun 2009, 16:21
by Eek
I have no idea what kind of reaction you are looking for.
I use bubba and php fusion to power my website and it works fine
just like gallery,etc
but the performance varies enormous per php project
probably if it has been written for speed or not

Re: Is Bubba useless for PHP?

Posted: 20 Jun 2009, 11:38
by ian
I suspect the lack of reaction from owners is that not many have written their own php applications, so are not in a position to comment.

However, I have installed wordpress (which is php based if I'm not mistaken) and it is incredibly slow, meaning that I've given up using it. I also use qwikiwiki, which again is php based, and this works fine, with no obvious performance issues.

I suspect the problem has much to do with the nature of the application in question, but I am certainly not qualified to offer anything more specific....

Re: Is Bubba useless for PHP?

Posted: 20 Jun 2009, 12:58
by GettinSadda
OK, I can see that I probably need to be giving a bit more info...

I have modified the relevant pages of my code to include the following as the first line of the file:

Code: Select all

<?php $start_time = array_sum( explode( ' ' , microtime() ) );
and at the very bottom of the file I have:

Code: Select all

$end_time = array_sum( explode( ' ' , microtime() ) );
$diff = $end_time - $start_time;
echo "<p>Time taken = $diff seconds</p>";
?></body></html>
The result printed is almost always sub 1 second, a few times slightly over, but the page can take over 30 seconds to load. So, what is happening before the very first line of PHP is executed?

Initially I thought the delay might be down to the script being compiled, but installing APC has not prevented the huge delay when the Bubba has not served the page for a few minutes. And I have checked, according to apc.php my scripts are being correctly cached.

I will investigate more and see what I can find!

Re: Is Bubba useless for PHP?

Posted: 24 Jun 2009, 10:24
by GettinSadda
OK, something I did recently has cut the 30 second delay to 4 seconds.

I am not sure what change caused this as I have tried a lot of little modifications to try and narrow down what was causing the problem.

I will keep investigating and post back if I discover anything helpful!