gajus / xhprof.io

GUI to analyze the profiling data collected using XHProf – A Hierarchical Profiler for PHP.
http://xhprof.io/
Other
429 stars 103 forks source link

append.php never returns #28

Open kenshaw opened 11 years ago

kenshaw commented 11 years ago

When using xhprof.io behind apache2 (on Debian stable) and PHP 5.3.3-7, append.php, the $xhprof_data_obj->save($xhprof_data); call never returns.

MySQL database is up and capturing data (rows are being created in the tables).

For reference, this is with a bare / basic Symfony2 codebase.

gajus commented 11 years ago

What do you mean by saying that append.php $xhprof_data_obj->save($xhprof_data); never returns? Are you expecting the method call to return some value, or are you saying that the function call timeouts?

kenshaw commented 11 years ago

Page generation times out (ie, function call timeouts ..).

gajus commented 11 years ago

Would you mind sharing some information about your server resources? Namely: CPU, RAM.

kenshaw commented 11 years ago

PHP server is on an i5 with 16 gigs of ram. MySQL server is on an i7 with 64 gigs of ram.

gajus commented 11 years ago

Have you tried debugging data.php save method to see where exactly does the script hangs?

kenshaw commented 11 years ago

Not yet, but can do so later.

gajus commented 11 years ago

Sounds good. Please share your findings here. Even if this is specific to your server, being able to detect it and throw exception will help everyone who will face the same issue.

thebeline commented 11 years ago

@kenshaw - What were your findings?

brpaz commented 11 years ago

I think I am having the same problem. When the append.php and prepend.php are included in php.ini my sites dont open.(They keep loading). XProf is working becuase the records are inserted in the database. PHP 5.3.10, apache 2.2.21 on ubuntu 12.04 32bits, running Symfony 2 app

haphan commented 11 years ago

Having the same problem here. Records are being inserted in database but the page keep loading...

php 5.4.16, debian 7, symfony2

staabm commented 11 years ago

Maybe the problem is triggered by the finish_request call in append.php?

jbarbede commented 10 years ago

It seems it takes a lot of time if your PHP script generates thousand of callees. I tried it on a Symfony 2 based application too and the page keeps loading because insertions of callees in the database is taking lot of time. Maybe the insertion strategy should be changed, like bulk inserting for example.

staabm commented 10 years ago

In my fork https://github.com/staabm/xhprof.io I added some performance enhancements which speedup the persistance of the profilling data a lot... If you like you can give it a try...

jbarbede commented 10 years ago

I am going to try it asap :-)