Site is loading very slow!
Hello everybody,
I have a question why my site is loading very slow..
all pages are in qcodo...with form create and run all stuff..
jobspert.com this is my site..
the features tab or placement papers tab or interview question tab working fine loading very fast....
but i dont know why rest like index page ... search page.. and all other page are loading very slow...
i also using memcache ... for caching purpose... query are optimized... the querys are the same in all pages.... like navigation, right panel etc...
can any body have any idea what might be the problem ...
we have a dedicated server... with 8mb ram...
still facing the problem....

Looking at your site with FireBug and it seems you are using chartbeat.net for tracking. It is taking a long time to run it's scripts. You may want to try commenting out the tracking code and test if the site loads quicker. Then get with them and see why it is suddenly running slow.
Chartbeat's code is asynchronous so doesn't affect page load at all. What you're seeing is the pings that chartbeat sends every few seconds as part of its tracking. None of these occur until after the on load event; Firebugs just handles things like this in a shitty way.
Yeah I caught that after the fact.
Ideas:
1) can you repro the slowness in a test environment? If so, do server-side profiling. This will give you full insight.
2) reboot apache and see if slowness continues.
3) look at server CPU and memory utilization. You might be running out of capacity.
4) turn off memcache temporarily and see if this helps.
This would be very hard to figure out without access to the server.
I have a hunch it has to do with one of your queries asking for way to much data for a view that only requires say, 10 items.
What I found on both pages were the Jobs by Category and Jobs by location box. I also found it on the interview questions page, which loads fine. So I'm assuming it isn't those.
You can do what alex suggested to find your problem. I'd also assume you have the same script that is taking for ever running on both pages and not every other page, unless obviously it has a "don't use me if" mechanism.
Hello alex & other,
Thnaks for your co ordination,
Its is working fine in my local terminal....
i have rebooted my apache serval times but problem continues...
turning off memcache doesn't help me anything...
the problem is we running out of mememory but i cant figure out where the memory leak occur... i.e. which script goes in circular loop... is there
anything that i can figure out which script or which mysql script causing me problem... in qcodo...
qcodo is the best php framework i have seen but still.. cant figure out what to do...
can anybody guide me with any piece of code or any script that help me...
its a live site and we are loosing customer...
thanks a lot...
And Happy New Year....
2 Keep u HAPPY & SAFE all the life long.
HAPPY NEW YEAR..!
If you want I can look over your code for you... just PM me credentials and any NDA if you want..
Do you delete and add new controls in your script very often?
So there could be a problem because of circular references.
(the parent has a reference to the child an vice versa and not deleting all the references results in a control not getting deleted because its reference count is not null)
If you stop the script the memory should be free again.
You need to be able to reproduce the issue in your test environment. To do so, I recommend stress-testing your test box using systems like AB (apache bench) until you can see the out-of-memory error. You will then be able to add profiling code to your Form_Create() functions to learn what exact is causing the issue.
Additionally, it'd be important to verify that indeed PHP is causing the out of memory issue - i.e. that it isn't your database server or some other thing.
Actually. I don't think that would help.
QCubed has some pretty bad implementation of recursive referencing.
class QForm {
protected $objControlArray;
}
class QControl {
protected $objChildControlArray;
protected $objParentControl;
protected $objForm;
public function __construct($objParentObject) {
if ($objParentObject instanceof QForm)
$this->objForm = $objParentObject;
} else if ($objParentObject instanceof QControl) {
$this->objParentControl = $objParentObject;
$this->objForm = $objParentObject->Form;
}
}
}
This is extremely bad in PHP. PHP does not handle circular referencing. It consumes a TON of memory. I even think if you unset the parent control, the memory still won't be collected on the child controls. I believe this was a bug back in 05/06 and they refused to fix it. A type of garbage collection was implemented in 5.3 to fix this issue.
I'm addressing these issues in v3.0.0 dev. I've implemented a multiton approach to classes that only need to be referenced once. A singleton pattern but expanded to pointers by reference. Though the handling of the child -> parent relationship will come differently.
Thanks all, For giving beneficial advice...
First of all how should i handle recursive referencing?.. please this is a big issue... i thought...
testing in production environment i got one update query which is causing problem... i optimize that query... now my site loads fine... do check it..
and i m testing each and every query ... and script...
and will shortly update u... about the changes...
i m using jet prfofiler .. to log slowest mysql query... and it result me a query which is running slow... i m optimizing it .... and soon ill update u....
thanks a lot for everything u people are doing...
Thanks
Good to hear! Glad you figured it out..
Don't worry about the recursion issue. It was mainly mentioned as a thought about performance improvements and my huge pet-peeves in programming. It is definitely something we will improve on.
I think the biggest site running "QCodo" is chess.com. They seem to do fine. I believe they have about 23 servers; last time I heard.
I think we can have a performance increase with a different setup for the child relationship though.. just stay tuned.. or help out if you like :)
Bas
Hi,
I am using qcubed framework. I am newbee in this framework. I have used QPanel in internal pages with Ajax.
So many times i am getting Ajax error while posting any form etc.. apart from this site is very slow so asyncronous request couldn't be completed before we clicking another request.
Web link: http://www.canadacallhome.com/index.php
Please suggest what are things we need to improve on my website so we can improve the performance.
The most frequent cause of performance issues are the queries that your pages are running. Turn on DB profiling and look through the queries - I was surprised every single time.