Scalability of PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
skirby
Forum Newbie
Posts: 1
Joined: Tue Feb 25, 2003 10:39 am
Location: San Francisco Bay Area

Scalability of PHP

Post by skirby »

In a multi-user Website environment, connecting to a database using ODBC, PHP version 4.22 seems to have a problem executing PHP code when about six user hit the system at the same time. It is a Window NT environment. The first php.exe session is about 5.4 megs each following is about 4.0 megs. The first session seems to hang and leaves several php sessions running which eventually time out. however they are left running. if i watch the sessions, if the first one finishing the other finish almost instantly right behind it and all session close properly.

Is there any tuning for the Windows environment that can be done in PHP. Any suggestions, since the scalability of PHP is in question. What can you tell me about known scalability issues. :?
kcomer
Forum Contributor
Posts: 108
Joined: Tue Aug 27, 2002 8:50 am

Post by kcomer »

Those sessions seem rather large. How much data do you keep in session variables? The sessions for our in-house applications rarely go over 2 or 3kb. Also, what kind of database are you using odbc to connect to? I hope someone can help you out. 5 or 6 users shouldn't slow down a server.

Keith
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

What db are you using, as asked allready is a good question. It's probably not an issue with the database itself, but instead the ODBC driver. Based on what you described. If it's a case where the PHP has a native driver for your db, try that instead of ODBC.

Let us know what db you're using.

Cheers,
BDKR (Terrence)
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

and which version of nt do you use? workstation/server?
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

What about copying the data to mysql?

The SQLyog tool (http://www.sqlyog.com/) has an ODBC import wizard which could be handy for updating the mysql end.

Maybe working that way wouldn't suit your needs though, eg if you need real-time access to the master data rather than a regularly-updated, static copy.
fractalvibes
Forum Contributor
Posts: 335
Joined: Thu Sep 26, 2002 6:14 pm
Location: Waco, Texas

Post by fractalvibes »

If you are storing 5.4 or 4.0 megs worth of session variables, you will most certainly bring any server to it's knees and blue screen of death no matter if you are using PHP or ASP or anything else, for that matter...!

The most you should ever store in session variables should be measured in K, not Mb. Use them sparingly and only when that is the best solution and it's info you would not want the user messing with in a querystring.

What are you doing in this app?

Phil J.
Post Reply