|
Posted by Shaun on 04/29/06 08:00
On Sat, 29 Apr 2006 13:40:42 +1200, "windandwaves"
<winandwaves@coldmail.com> wrote:
>Hi Folk
>
>I am managing a site, www.friars.co.nz that seems to be hitting the limits
>and I keep getting the 500 error. According to the people from webfarm it
>is because my script are too demanding or not closed properly.
>
>I dont believe you have to "close" PHP scripts or even database connections.
Ideally you shouldn't have to do either. PHP scripts automatically
close all resources upon termination, unless you've explicitly asked
them to do otherwise.
I've rarely encountered a 500 error using PHP, typically it crops up
with Perl scripts. In most situations, PHP will throw its own errors,
which are descriptive enough to trace the source of the problem.
(Granted, I just posted a few moments ago about an exception to this
case...)
>The site also accesses a 80 Megabyte database.
Database as in...? MySQL? How much traffic are you getting? Are you
using persistent database connections, or normal ones?
>Do you know of a way I can find out where the problems are or improving the
>performance of the site?
I'm not familiar with webfarm; with any luck, they give you a PHP
error log, or they send PHP's errors into Apache's error log. Whatever
error logs are available to you, check them religiously.
>I uses ob_start and ob_end_flush, would that cause problems?
Jerry did that one justice in his response.
hth
-
Remove mypants to email.
<http://www.shaunc.com/>
[Back to original message]
|