Jump to content

Site unbelievably slow


Xonox
 Share

Recommended Posts

Hello,

I've searched high and low and this came to a point where there's not much I can do. I'm simply unable to view the site, now.

So far:

1. index.html - HTML file is fast, so it's not an apache problem.

2. text.php - A simple php showing php info is fast, so it's not a PHP problem.

The site has been becoming slower and slower over time. I installed xdebug and I get the results you can see in the attached images.

I'm concerned because this is a problem that is getting worse, and worse, and worse. To the point to which is impossible to keep working in the website.

Any ideas of what I might do to improve this situation. It's getting real bad in the site and also on the backend.

Thanks...

 

xdebug-002.jpg

xdebug-003.jpg

xdebug-004.jpg

xdebug-001.jpg

Link to comment
Share on other sites

Quote

hi Xonox,

have you read this topic? 

Yes, I have. Done that!

To no avail! :(

Meanwhile my website improved a little by not calling renderNavTree in some files.

Is there any problem with this function?

Link to comment
Share on other sites

Now it seems like it's a matter of time. After I restarted the computer, everything was running fine.

After calling some pages and improving some code, it all started to crumble. To the point where I can't even get a "Maximum execution time of 30s exceeded" it just keeps waiting. :(

I'll keep digging.

Link to comment
Share on other sites

3 minutes ago, pwired said:

Start task-manager and see if there is a process with unusual resource use. Check how many apache processes are running.

Try to use 127.0.0.1 instead of localhost.

There's no unusual process consumption. It appears like I have 2 apache services.

I'm already using 127.0.0.1

I have several ProcessWire installations that are working. This one in question seems way off, for some reason. 
 

Link to comment
Share on other sites

Although you were experiencing this issue before enabling xdebug, xdebug itself really slows down PW.  But that doesn't seem to be the issue in your case.

Some things to try:

  • try running the site on a production server and see if it's slow.  if it's not, there's some issue with your local server.
  • if you're using an old version of wamp-server (like v 2.4), try upgrading to a newer version.  i hit an issue a couple years ago on an older version that was plaguing me.
  • perhaps you're doing some crazy stuff with your code that you may not realize.  keep trying to selectively remove various parts of your code and refreshing your site to see if you get a moment where everything clears up.  then analyze the problematic code.

Let us know how it works out.

  • Like 4
Link to comment
Share on other sites

On 8/6/2016 at 7:45 PM, Jonathan Lahijani said:

Although you were experiencing this issue before enabling xdebug, xdebug itself really slows down PW.  But that doesn't seem to be the issue in your case.

Some things to try:

  • try running the site on a production server and see if it's slow.  if it's not, there's some issue with your local server.
  • if you're using an old version of wamp-server (like v 2.4), try upgrading to a newer version.  i hit an issue a couple years ago on an older version that was plaguing me.
  • perhaps you're doing some crazy stuff with your code that you may not realize.  keep trying to selectively remove various parts of your code and refreshing your site to see if you get a moment where everything clears up.  then analyze the problematic code.

Let us know how it works out.

I decided to reinstall XAMPP all over again, and all the sites started to load faster. However I removed all the databases that I had before (about 100). I can't really tell why, but to me, it seems that MySQL was the culprit.

One thing that was happening, which was weird: Every time I refreshed the slow site, Apache would open a new port. It came to a situation that i had dozens of ports opened for Apache, instead of just 80 and 443. This was what made me reinstall XAMPP all over again.

However, sometimes, in the production server, the sites becomes really slow which means that I'm not out of the woods, yet. In the tests I made, the slowing down is caused in the server because the page takes about 20 to 30 sec. to be received, but then, all the elements take a couple of ms. So I believe that it is some processing or dbase access that is taking too long. When I call my service provider, they always say everything is ok. However, in the production site I only have one active database.

An other thing that might be related: The admin users tell me that sometimes, when they try to crop a large image, the site keeps them waiting for ever without managing to succeed the crop. Might it be related to image processing?

On 8/5/2016 at 8:41 PM, horst said:

what modules / third party modules are runnin in this installation?

Third party modules:

- Email Obfuscator
- Fieldtype Time
- Upgrades Checker

On 8/5/2016 at 7:18 PM, pwired said:

Could be a caching/memory problem. Try to trace it with a tool like monyog and look for any bottlenecks happening inside the database.

I turned on the cache for some of the most demanding pages. Thanks pwired, I was looking for a tool that would give me some insight on MySQL performance, monoyog looks perfect for it. 

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...