RE: [PHP] PHP Cache (was PHP load to high on server)

2006-01-18 Thread Stefan Moldoveanu


http://eaccelerator.net/HomeUk
Actually, is the former mmCache with a new team of developers and some 
impovements.
The last known version of mmCache I've played with one week ago core dumped the 
httpd on ./apachectl stop.
The last stable version of eAccelerator (0.9.3, I think) works like a charm 
with PHP 4.4.2 / Apache 1.3.4

Stefan

Albert wrote:


I also want an opcode cache to cache the compiled pages on the server in an
attempt to speed up the HTTP server.

For this I wanted to use mmCache (actually I want to use Zend Performance
Suite but first I need to prove that it is worth $ 1000 per CPU and from the
stats on the mmCache site mmCache is faster...) but it seems that the
mmCache project has been abandoned as there have been no work done on it
since 2003.

Can someone confirm this or recommend an alternate cache (doesn't have to be
free but should break the bank) which will do what I want? 


Albert



RE: [PHP] PHP load to high on server

2006-01-18 Thread Stefan Moldoveanu


Hello,
The same problem I've had on a FreeBSD 4.11 box, running Apache 1.3.3 and PHP 4.3.5. 

From time to time, httpd went to 90%+ (I supposed it was a memory leak or smth).

After upgrading Apache to 1.3.4 and PHP to 4.4.2, everything smoothed down and 
we got no more 90+% httpd, even on heavy load.
If possible, try to downgrade/upgrade PHP and/or Apache (eventually on a test 
machine).

Regards,
Stefan





From: Jochem Maas
Sent: Mi 18.01.2006 18:59
To: Adi
Cc: Albert; PHP List
Subject: Re: [PHP] PHP load to high on server


Adi wrote:

Run some tracer apps on your code...could be some wild loops of some sort?
Never the less, ZEND debugger with the module should do the jobit will
tell you which files/functions etc are runningnice tool to track
execution time etc...

On 1/18/06, Albert <[EMAIL PROTECTED]> wrote:


Hi



I am running SuSE 9.2 (Kernel 2.6.8-24-default) with Apache 2.0.50 and PHP
4.3.8 (as an Apache module) on a Celeron 900 with 304MB RAM. This machine
is
used for testing. We have made some changes to our PHP application and now


what changes? DB related per chance? doing any queries on tables that are
not indexed properly? or maybe your app creates tons of objects? (in which
case you might look at being able to clone objects rather than init new
ones where possible).


the machine is having trouble serving the pages. Apache is occupying
almost
90% CPU usage.



My Apache log configuration is:

%a %b %H %r %>s %t %T %X

%a : Remote IP

%b : Size of response

%H : Protocol

%r : Request

%>s : Last status of request

%t : Time of request

%T : Time to serve

%X : Connection status after serving request



In the log below the last character after the timestamp indicates the
following:

X : Connection terminated before end serving request

+ : Connection might not be terminated

- : Connection terminated



As you will notice almost all the statuses is connection might not have
been
terminated.



The page having the heaviest load uses 5 simultaneous sessions - they
refresh every 5 seconds. Even with just one connection there are 16 Apache
threads running all occupying between 5 and 20% of CPU.



Does anyone have an idea of what I can do (short of recoding)?



TIA



Albert



From our Apache log:

192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200

[17/Jan/2006:16:16:29 +] 1 X

192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D1024&w=3D1280 HTTP/1.1 200

[17/Jan/2006:16:16:28 +] 2 +

192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200

[17/Jan/2006:16:16:29 +] 1 +

192.168.x.x 2839 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:29

+] 2 +

192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200

[17/Jan/2006:16:16:31 +] 1 +

192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200

[17/Jan/2006:16:16:31 +] 1 +

192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200

[17/Jan/2006:16:16:33 +] 0 +

192.168.x.x 429 HTTP/1.1 GET /display_background.php HTTP/1.1 200

[17/Jan/2006:16:16:32 +] 2 +

192.168.x.x 178 HTTP/1.1 GET /selObject.php HTTP/1.1 200

[17/Jan/2006:16:16:33 +] 3 +

192.168.x.x 3325 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200

[17/Jan/2006:16:16:33 +] 3 +

192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200

[17/Jan/2006:16:16:33 +] 3 X

192.168.x.x 1249 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:33

+] 4 +

192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200

[17/Jan/2006:16:16:34 +] 3 +

192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200

[17/Jan/2006:16:16:37 +] 1 +

192.168.x.x 431 HTTP/1.1 GET /display_background.php HTTP/1.1 200

[17/Jan/2006:16:16:35 +] 3 +

192.168.x.x 2823 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:35

+] 4 +

192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200

[17/Jan/2006:16:16:39 +] 0 +

192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D768&w=3D1024 HTTP/1.1 200

[17/Jan/2006:16:16:37 +] 3 +

192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200

[17/Jan/2006:16:16:38 +] 3 X

192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200

[17/Jan/2006:16:16:39 +] 2 X

192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200

[17/Jan/2006:16:16:39 +] 2 +

192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200

[17/Jan/2006:16:16:39 +] 3 +

192.168.x.x 2828 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:39

+] 3 +

192.168.x.x 429 HTTP/1.1 GET /display_background.php HTTP/1.1 200

[17/Jan/2006:16:16:42 +] 2 +

192.168.x.x 178 HTTP/1.1 GET /selObject.php HTTP/1.1 200

[17/Jan/2006:16:16:43 +] 2 +

192.168.x.x 3325 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200

[17/Jan/2006:16:16:43 +] 3 +

192.168.x.x 1260 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:43

+] 3 +

192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D1024&w=3D1280 HTTP/1.1 200

[17/Jan/2006:16:16:43 +] 3 +

[PHP] Converting PHP code and db schema from PostgreSQL to MySQL

2004-09-20 Thread Stefan Moldoveanu
Hello, folks,
 
Is there any tool/script to convert PostgreSQL code from PHP scripts into
MySQL (pg_connect > mysql_connect and so forth)?
I'm talking about a website with thousands of code lines.
 
Also, any script which can convert PostgreSQL db data schema to MySQL? I
only found tutorials for MySQL > PostgreSQL conversion.
 
 
Any link / tutorial / etc. would be highly appreciated.
 
 
Thank you,
Stefan