Jump to content

[SOLVED] 30 seconds to load index page - reason: external calls?


Recommended Posts

Hi all,

We are running Prestashop 1.2.5 and the last two days we have been experiencing speed issues. From loading really fast the shop now takes around 30 seconds to load initially. Once it has loaded though the speed for accessing other pages is the same as before. I have talked to our web host who explains that the problem has to do with external calls outside the server.

What could be the issue here? Is perhaps Prestashop 1.2.5 calling some function that no longer exists an waits for it to time out before loading the page?

I would be very grateful for any input that could help me solve this problem.

Thanks in advance!

Link to comment
Share on other sites

I just want to add a clue that I just discovered. I noticed that the problem appears only when the index page is accessed. If I enter a sub-page directly by clicking on a link, then the site loads at a normal speed. But if I then click on the "Home" button the problem is the same. It takes about 30 seconds to access the index page.

Does anyone know if there are calls for external scripts when the index page is accessed?

I would really appreciate some help here :-)

Link to comment
Share on other sites

Is there anyone running version 1.2.5 and experiencing the same problem?

I am working on upgrading my shop to 1.4 but it's going to take time due to many core modifications, so I would really appreciate som advice as to how I can fix this problem in 1.2.5, at least temporarily.

Please, anyone?

Link to comment
Share on other sites

Turn off Javascript in your web browser and see if it takes as long. If not, then it is likely all of the AJAX that is going on (categories generation can be pretty heavy).

If it is still very slow then try disabling modules until the performance goes back up.

Cheers

Link to comment
Share on other sites

Thanks very much for the advice!

I have already tried disabling modules, but no luck there. I just followed your advice and disabled javascript in my browser, but neither that had any effect whatsoever.

In fact, nothing that I do affects loading time for the home page in any way. It stubbornly remains a good 30 seconds no matter what. When the 30 seconds have passed the page loads almost instantaneously.

In fact, the site doesn't show any signs of lagging in the normal sense. To my experience a lagging site is loading slowly but little by little. On my site absolutely nothing happens for 30 seconds and then everything loads almost at once.

Could it be waiting for something to time out?

Link to comment
Share on other sites

Sorry! Of course you need the URL.

I'm not sure if I got you right, but the issue has nothing to do with my browser. The problem has been confirmed from many locations and with different browsers. Exactly the same thing happens no matter from where you connect or what browser you are using.

I have set up a test page in my Prestashop root folder.

It loads instantaneously on my computer.

Link to comment
Share on other sites

This is definitely a local issue (telnet to port 80 on your host and do an HTTP request manually to see the pause). My expectation is that a module on the front page is triggering an unoptimized query (or a bunch). How many items do you have in your Home directory? The featured module may be hitting something there. I do not think it is category based as your other pages do not seem to have the same problem.

If you have root access to MySQL, log into it and check for slow queries. That would give you something more specific to look for (i.e. you could then search source files for query fragments). Other than that, the usual stuff applies to isolate the cause: enable PHP errors, check your error logs and again, try disabling all modules on the front page.

This really feels like a module problem though you should also check your MySQL database and make sure there is no corruption.

Cheers

Link to comment
Share on other sites

Thanks again for looking into my problem!

I will try your troubleshooting advice to the best of my knowledge.

What is confusing me though, is that I haven't made any changes whatsoever to the core, theme or any of the modules in several weeks. The problem suddenly appeared out of nowhere on April 13.

Link to comment
Share on other sites

I finally solved the problem. You were right that it was a module causing the problem. I had disabled all modules except for the most obvious one: the home featured products!

I had downloaded a modified version of the module from the forum a long time ago. I have no idea why the bugger suddenly started malfunctioning. I disabled it an reactivated the original module and now, lo and behold, everything works just fine again!

Thanks codegrunt for your kind support!

Link to comment
Share on other sites

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
×
×
  • Create New...