On Sat, Feb 08, 2003 at 01:13:28PM -0500, pthes wrote: > > Here are some claims from the hosting service: ... > 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 never safe to allow customers to upload their own scripts in a shared hosting environment. I can't count the number of times I've had to step in and disable an account (or at least a CGI) because a customer wrote or uploaded something that consumed too many resources. > 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. Without seeing the code, it's hard to determine what you're doing wrong; if you're using a CREATE TEMPORARY TABLE, the table will automatically be deleted shortly after the database connection is closed. This would obviously consume memory in the database server for every temporary table created. > 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. If you're using mysql_pconnect() to talk to the server, remember that each persistent connection is tied to just one web server process. If the web server has "MaxClients 150" set, then there can be a maximum of 150 persistent database connections, even if there's just one PHP script opening them all. > 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. This is legitimate. I've seen serious degradation of MySQL performance with much lower load than you're generating, always caused by programming with a complete lack of regard for the database server's resource limits. If you don't know how to make your code more database friendly, you might want to consider hiring a programmer to do it for you. Or if you prefer, spend the money on a dedicated server, and watch *it* grind to a halt as well. :) > 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. You are, they do, and you are. -- Paul Chvostek <paul@it.ca> Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php