Is my Hosting service full of it?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I had trouble the other day. Ran a survey which generated about 700
responses an hour. It ran fine, then about 90 minutes in everything slowed
up. The hosting service suspended our domain claiming our survey was
overload the server. We had run the survey previously using PERL as the
scripting language. It worked OK then. The only significant change in the
scripting is that we switched to PHP from PERL.

Here are some claims from the hosting service:

Comment 1
Your survey, http://www.erespond.ino/thestar, is the cause of the server
crashing.

It is exceptionally PHP and MySQL heavy and unfortunately not the kind of
application you can safely run in a shared-hosting environment.

It is severely depleting resources on the server and denying other hosting
clients access to their sites.

This sort of survey should only be run on its own dedicated server, though
I'm not sure that would help in this case as the PHP scripting seems to be
running at above the necessary resources.

Comment 2 re: perl vs php
Yes, PHP would make a difference. Though it may be faster, it can devour
resources and grind everything to a halt.

If you had success running this survey previously in Perl, then I would
suggest doing the same now.

Comment 3: claim scripts as redundant
After checking out your PHP scripts for this survey, it's our view that they
are employing some redundant processing which is the cause of the memory
drain on the server.

Basically, it appears to be processing the same information over and over
again when it adds something new.

Comment 4:
We currently running PHP Release 4.1.2-3 on this server. We are waiting for
the stable release of PHP 4.3 for our servers.

In response to your questions:

So you suggest leaving the db open? What happens when someone bails out
before the end? Would that then cause another problem?

- You should be able to initiate a db close after a certain amount of time.



We had about 600-700 hits an hour for the survey. Is that too much volume
for you?

- Nope. We can do about 300 per second. The problem was the PHP and MySQL
applications eating memory.



Is the actual problem the scripting or the graphics that are loaded during
the survey?

- The scripting. We can serve about 20 million hits per day for regular
files.



I've been researching some sites regarding resources for php, mysql and
perl. General feeling seems to be that PHP is more efficient and doesn't
create any signifcant resource needs over perl.

- Very true. However, if the coding isn't done well it can devour a server.
I've seen it happen countless times over the past few years. Same goes for
CGI of course. But if your other script ran without incident, it seems
obvious that the CGI version is the better choice for now.


Are concurrent connects with mysql the problem?

- They certainly don't help. The MySQL server is shared amongst other sites
on this same server and obviously can only handle so much happening at once.

Comment 5: response to I don't believe php is worse than perl
CGI scripts are called once a form has been completed, the script then runs
quickly and closes itself. A pHp page May open a connection to mySQL at the
opening of the page, or later in it: either way instead of having the
information passed to mysql in a separate place, it is done in the same
place.

It gives the impression of being more efficient(since a step is skipped) but
for high traffic operations it can bog down a mySQL server, Especially if it
is a shared one.


I wondering if anyone has an opinion of whether I'm dealing with people who
don't know what they're doing. Do any of their comments make sense.
I'd be glad to provide further clarification if desired. I just have a real
feeling that I'm not getting knowledgable answers.
Thanks in advance.




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux