Page 1 of 1
Scalability of PHP
Posted: Tue Feb 25, 2003 10:39 am
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.

Posted: Tue Feb 25, 2003 10:56 am
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
Posted: Tue Feb 25, 2003 11:53 am
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)
Posted: Tue Feb 25, 2003 3:39 pm
by volka
and which version of nt do you use? workstation/server?
Posted: Tue Feb 25, 2003 5:32 pm
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.
Posted: Tue Feb 25, 2003 6:35 pm
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.