View previous topic :: View next topic |
Author |
Message |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Mon Oct 29, 2007 4:00 am Post subject: PHP Running very slowly |
|
|
I am using Abyss X1 with PHP configured as FastCGI Local Pipes but the site is running slow and only has 2 php-cgi.exe processes running no matter how many people are connected. It's my understanding that there should be multiple running?
The system specs are:
P4 2.4
1GB Ram
Windows XP SP2
Abyss 2.5
PHP 5.1.4
MySQL 5.0.45
I believe the issue is with PHP as plain HTML pages load instantly, as does images and files transfer quickly. The issue also does not appear to be with MySQL as I am running PHPMyAdmin 2.11.1 which takes about 5-10secs and sometimes even longer to generate the page, but if you look at the SQL execution time it is only a fraction of a second
I sorted a user list by last login time and it shows the SQL execution time as 0.0043 of a sec but still took about 15 secs to load the page:
"Showing rows 0 - 178 (179 total, Query took 0.0043 sec)"
Any idea how I can get this to speed up as I really want to use Abyss as it is soo much easier to configure and use over Apache and I really really don't want to switch but I can't have 15 second page generation either! |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Mon Oct 29, 2007 9:56 am Post subject: |
|
|
Its normal for 1 or more to be running, thats how fast cgi works. If one user makes a hit one will load. If two users hit at once, two will load, but two will remain even if one hit is made afterwards because it reuses them. Once one of them has been open for the set time in the configuration with no hits, it will close.
Your server specs are fine. phpMyAdmin is slow in general to be honest. As long as normal php pages load quickly there is no problem. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Mon Oct 29, 2007 11:44 am Post subject: |
|
|
I know it's normal for more then 1 to load, my question is why does only 2 load? It is also not just slow with PHPMyAdmin but also with Drupal which is what my website is created upon. I never had this problem with apache on a linux box but on the win32 server I have to use at work (Which is what the site is for) I chose Abyss for it's ease of use. I'm not sure if it's because apache loads php as a module as opposed to executing an exe but it was definently fast compared. It also appears to be the slowest the first time you launch the site taking approx 15 seconds, however subsequent pages still take 5-10 secs. Is there anything you can suggest to speed it up? Will X2 be faster or is it mainly for multi domain support? If I can't get it to work I will probably just try apache on windows before pleading for a *nix box :) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Mon Oct 29, 2007 11:47 am Post subject: |
|
|
Only 2 load because only 2 have ever been needed for requests. If you get two simultaneous requests then 2 will load, after that if you only get 1 simultaneous request only one will be used.
I would think its some sort of configuration error thats making it so slow. You might try disabling some extensions you don't use in the php.ini or trying another php version. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Fri Nov 02, 2007 10:53 am Post subject: |
|
|
Would your pages, by any chance, be trying to retrieve the reverse hostname of the user?
I had a counter before that would do that. If there was no reverse hostname, the page would take about 6 seconds (that's forever in computer terms) to load. If there was a hostname, it would load nearly instantly.
Also, I've advised many to run PHP in CGI mode. Obviously FastCGI isn't exactly fast for you right now. It could be a configuration error. FastCGI is just another headache for web programmers - just search the forum! _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Fri Nov 02, 2007 2:22 pm Post subject: |
|
|
What do you mean by trying to retrieve the reverse hostname???
I have tried connecting via IP as well as the Server's hostname as this is a corporate server, also it runs just as slow connecting to 'Localhost' or loopback IP '127.0.0.1'
I haven't tried regular CGI, I will try this next time at work and report back my findings. Is there anything else you might recommend? |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Fri Nov 02, 2007 3:12 pm Post subject: |
|
|
A script or page you are running might be trying to get the reverse host name of the person connecting to the page, eg yourself. These lookups can take more than 10 seconds in some cases. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Sat Nov 03, 2007 12:34 am Post subject: |
|
|
acecombat wrote: | What do you mean by trying to retrieve the reverse hostname??? |
The reverse hostname is hard to explain because it has to do with the silent, invisible portion of the internet that maps domain names to IP addresses (called Domain Name Servers).
You could search for it, hopefully finding a satisfactory explanation.
In PHP, the reverse hostname is called by gethostbyaddr(). You might search all PHP files stored on your server for gethostbyaddr
-------------------------------------
If you don't get PHP to work right, see this post: http://www.aprelium.com/forum/viewtopic.php?p=70241#70241 _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
NuccatheWarrior -
Joined: 18 Oct 2007 Posts: 82
|
Posted: Wed Dec 19, 2007 12:23 pm Post subject: |
|
|
Is the a way to speed up the loading time. for example 15-5 seconds. Is there a way to set the time in the php.ini? _________________ Site Administrator of Nucca The Warrior's Website
http://nuccathewarrior.kicks-ass.org |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Dec 20, 2007 3:38 pm Post subject: |
|
|
NuccatheWarrior wrote: | Is the a way to speed up the loading time. for example 15-5 seconds. Is there a way to set the time in the php.ini? |
All depends on your code. Post it here and we may find ways to suggest how to speed it up. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
NuccatheWarrior -
Joined: 18 Oct 2007 Posts: 82
|
Posted: Thu Dec 20, 2007 5:36 pm Post subject: |
|
|
What the whole php.ini file coding on here? _________________ Site Administrator of Nucca The Warrior's Website
http://nuccathewarrior.kicks-ass.org |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Fri Dec 21, 2007 1:46 am Post subject: |
|
|
I think Aprelium was asking you to paste the code for your PHP page, not your php.ini. Then we will help you optimize it to run quicker. _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
NuccatheWarrior -
Joined: 18 Oct 2007 Posts: 82
|
Posted: Fri Dec 21, 2007 3:51 am Post subject: |
|
|
Its not the php page, i'm running phpnuke platinum on the server. 'm just asking if there is a way to speed it up from the php.ini _________________ Site Administrator of Nucca The Warrior's Website
http://nuccathewarrior.kicks-ass.org |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Dec 22, 2007 3:51 pm Post subject: |
|
|
NuccatheWarrior wrote: | Its not the php page, i'm running phpnuke platinum on the server. 'm just asking if there is a way to speed it up from the php.ini |
PHPNuke is a PHP script like any other. If it's badly coded or if it has a lot of work to do (besides the MySQL calls- extensions loading - privileges checks - ACL validations), it needs time to do it.
There are several ways to trace a PHP script and determine where the time is spent (it's called profiling). Unless you do that, there is a little chance that a single setting will cut your page loading time by 66%. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
NuccatheWarrior -
Joined: 18 Oct 2007 Posts: 82
|
Posted: Sun Dec 23, 2007 7:56 am Post subject: |
|
|
So I have to go into the SQL server in order to speed it it up right? or do I have to go into the configureation file to edit the timing? Thats what is sounding like to me. _________________ Site Administrator of Nucca The Warrior's Website
http://nuccathewarrior.kicks-ass.org |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
NuccatheWarrior -
Joined: 18 Oct 2007 Posts: 82
|
Posted: Mon Dec 31, 2007 6:15 pm Post subject: |
|
|
Okay I can't find where you set the timing in the SQL server. I thought i knew but i was wrong, i used to the 3.X one, cant exactly remember. Ive been looking for the section where you can make the site load faster for phpnuke platinum. Where can i find the timing section of the file. Or is there another file that controls it? _________________ Site Administrator of Nucca The Warrior's Website
http://nuccathewarrior.kicks-ass.org |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|