Jump to content
strandoo

PW 3.0 + PHP 7 creates huge latency (but not if signed in as admin!)

Recommended Posts

Hello. I've come across strange behaviour under the following situation. Maybe someone can explain what's happening?

PW 3.0.42 running on a FastHost php 7 server. Initial page loads have about a 6 second latency! At first I thought I had some bad code, but I stripped everything back to the most simplest of pages, still with a huge loading delay. Once I log in as a superuser, the pages load normally (150-200ms). This was happening on at 3 sites. All pages had a latency of about 6 sec. until I logged in to the admin panel. I also have one or two PW 3 sites running on an older php5.6 account, which runs normally.

I downgraded one of the php 7 sites to php 5.6 and the pages loaded normally.

One more thing that may or may not be related: I did get an error "WARNING: SET_TIME_LIMIT() HAS BEEN DISABLED FOR SECURITY". That took me down a path of setting the max_execution_time in .htaccess. Which also inspired me to downgrade from php7 to 5.

The curious thing is how signing in as a superuser solves the problem. Thanks. - Paul

Share this post


Link to post
Share on other sites
5 hours ago, strandoo said:

Hello. I've come across strange behaviour under the following situation. Maybe someone can explain what's happening?

PW 3.0.42 running on a FastHost php 7 server. Initial page loads have about a 6 second latency! At first I thought I had some bad code, but I stripped everything back to the most simplest of pages, still with a huge loading delay. Once I log in as a superuser, the pages load normally (150-200ms). This was happening on at 3 sites. All pages had a latency of about 6 sec. until I logged in to the admin panel. I also have one or two PW 3 sites running on an older php5.6 account, which runs normally.

I downgraded one of the php 7 sites to php 5.6 and the pages loaded normally.

One more thing that may or may not be related: I did get an error "WARNING: SET_TIME_LIMIT() HAS BEEN DISABLED FOR SECURITY". That took me down a path of setting the max_execution_time in .htaccess. Which also inspired me to downgrade from php7 to 5.

The curious thing is how signing in as a superuser solves the problem. Thanks. - Paul

Can you reproduce this behavior using a clean install of ProcessWire? I've had no issues running PW3 on PHP 7 so far. It's running like a champ and much faster on 7 thought :-)

  • Like 2

Share this post


Link to post
Share on other sites

@strandoo

same (no issues) here....using pw 3 + php 7.0 with page load times from 27 to 66 ms and the memory usage ranges from 2 to 4 MB.

Can You give some details (number of db queries, number of fields, templates, pages, installed modules)?. I also suggest to try a clean basic-profile install and see if the issue disappears. Then enable 1 module at a time and see what happens using a second browser (or a private navigation window) for visiting as guest user.

kind regards.

Share this post


Link to post
Share on other sites

Thanks for the suggestions. I did do a fresh install with the default theme to a subfolder on the same server. No extra modules, no new pages. Same thing: fast/normal when logged into the admin; sloooooow when not. I did get another warning about 'Warning: set_time_limit() has been disabled for security reasons', so I'll probably contact the hosting company and see if they can suggest anything. I'd like to be able to set a time limit, just to rule that out; I can do it in htaccess for php5, but I can't figure out how to do it for php 7. I can work around the issue by reverting to php 5, but that's not great.

Share this post


Link to post
Share on other sites

That's really weird. Please make sure to keep us updated if you or your hosting company finds a solution so others can find help here.

  • Like 1

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...