Re: hitting the limits



Jerry Stuckle wrote:
windandwaves wrote:
Shaun wrote:

On Sat, 29 Apr 2006 13:40:42 +1200, "windandwaves"
<winandwaves@xxxxxxxxxxxx> 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.



Hmmm, yes, we have only about 10,000 unique visitors per month and a
relatively straight forward MySql database. However, we have shared
hosting, I think that is where the problem lies....

Thanks for your reply


Nicolaas




10K visitors a month and an 80Mb database are nothing. Any shared
host should be able to handle that, also.

If you think it's a problem, talk to your hosting company. Maybe the
server you're on is overloaded and they will move you to a less
heavily loaded server.
I'm not familiar with webfarm - but they may be right, also. For
instance, if you don't close your mysql connection, it will be closed
eventually. But the connection will hang around until the garbage
collector gets around to cleaning things up.

I will do a close database connection at the end of each script and see if
it makes a difference.

And look at how efficient your code is. I've seen some pretty good
code - but I've seen some very inefficient code out there, also. And
the inefficient code will require a lot more resources.

It is so hard for me to judge if the code is efficient. Really - who knows.
I know what efficient code is, but there are just so many variables. Even
making changes tot the php.ini could be huge.

Each page loads about 100Kb of libaries and functions... (probably 50 - 100
functions (small ones) in total)... Does that make a difference?
I have a couple of tables in the database with over 300,000 (small) rows)...
Does that make a difference?
I use a lot of session variables (i.e. I keep a log of each page visited for
each person), but all of them are stored in highly optimised Mysql tables
(e.g.

person ID, page ID, time
person ID, page ID, time
person ID, page ID, time
person ID, page ID, time

In the end, because it is such muddy water, it is probably cheaper to pay
for a dedicated server than to spend hours optimising your code. I can do
fast development and write code in such a way that it is easy to maintain.

Thanks for your reply. Much appreciated.

Nicolaas



.



Relevant Pages

  • Re: ADO Connection Timeout
    ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Complicated Connection Problems bewteen ADP and SQL Server
    ... This database ... expertise for getting the user workstations talking to the SQL Server. ... connection would fail and the adp wouldn't be able to talk to the server. ... might be in my ADO connection string. ...
    (microsoft.public.access.adp.sqlserver)
  • Complicated Connection Problem between ADP and SQL Server
    ... This database ... expertise for getting the user workstations talking to the SQL Server. ... connection would fail and the adp wouldn't be able to talk to the server. ... might be in my ADO connection string. ...
    (microsoft.public.sqlserver.connect)
  • Re: ADO Connection Timeout
    ... so what happens when a connection failure forces one station to revert ... to a local database? ... Further, you *will* have contention issues, Jet does not support record ... to the central server, but you are willing to live with periods where it ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... When the first test is run, the results are stored in the central database. ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)