Skip Navigation

[Resolved] Site very slow admin and public page

This thread is resolved. Here is a description of the problem and solution.

Problem:
The WordPress Admin screen loads very slow with Toolset and WPML Enabled.

Solution:
First ensure all Plugins are up To date and also WordPress is updated.
Majer performance improvements have been made.

Then, if the issue persist, please consider this instructions:
https://toolset.com/forums/topic/site-very-slow-admin-and-public-page/#post-378913

Relevant Documentation:
https://toolset.com/documentation/user-guides/how-to-use-views-parametric-search-on-large-sites/
http://redstarwebdevelopment.com/2013/05/how-to-remove-w3-total-cache/

This support ticket is created 8 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Jean AS 7 years, 11 months ago.

Assisted by: Beda.

Author
Posts
#378782

Hello,
please this is very urgent to fix as soon as possible.
I have several issues with Toolset plugins and I hope you can help me find a fix soon because my clients are very disappointed. Me too as I've run out of budget by thousands in trying to make it work properly. I put my trust on Toolset for a real estate project because I tested it before buying and it looked ok for this project, so I hope you can really help me find a solutions so the site works fine and the clients are happy.

There is a working copy of the site on a secured area for developing and testing purposes and a live site (which has the very latest updates), so you can play around in the developing area and apply the required changes to the live site once you figure out the problem or tell me exactly what to to and I do it.

The site is live and now more or less it works, but with some downsides which make it nearly unusable:

1- The most important issue: The site is incredibly SLOW.
To speed up a bit the public site, I've installed W3 Total Cache, but the admin side is still very slow. I've been searching in the forums and on Internet for any fixes, but unfortunately I couldn't find anything that could help me.
Some times I even get Error 500 on pages on the public site (like the search results page after clicking on the search button) because server goes out of memory even with 256Mb of RAM assigned, which is a lot and should be more than enough for a small real estate site like this.
It is a real estate web site with near 300 properties and it uses WPML for translation in 5 languages.
The database has an huge size of more than 300Mb for just a few 300 properties (in 5 languages)

The server is very fast (Intel Xeon Quad core with HT CPU Processor, with SSD storage, plenty of RAM and with just a few web sites on it) and runs other sites really very fast. The web site is in a shared hosting environment with CloudLinux.
Apache 2.4
Deflate and gzip compression
PHP version 5.6.18 with OpCaching and Redis
MySQL 5.6.29
PHP Time limit: 600s
PHP Max Input Vars: 10000
WP Memory Limit: 256Mb

I've seen in this post what Ross Fisher said:
https://toolset.com/forums/topic/slow-site-speed-and-resource-errors/
My server complies with all the requirements and even if probably this won't be a very fast page, at least it should work under normal load times.

Please have a brief look and see if I miss anything. I give you admin access and login details in private.

2- In the most important custom post type: "Properties" I've added the "Gallery field" from ACF Pro (hidden link) because is way more intuitive and fast to use that the image repeater field from Toolset Types. Also the ACF Gallery field has better compatibility with WP All Import plugin, which this web page uses to import XML properties, so I need to be able to use this kind of field.
The field is there but the only thing that doesn't work anymore is the drag and drop functionality used to reorder the photos. This was working previously, but it stopped working at some point. I just noticed it last week and I contacted ACF Support which told me that sometimes Toolset and ACF come in conflict with some things so they suggest to change all the custom fields to be created by ACF and this is not possible at this time. All the custom fields are created with Toolset. Just the gallery is ACF and the drag and drop should work again.
Please I ask you to have a look at what could be the problem and release a fix as soon as possible and include it in the next update, because I'm sure I'm not the only one having this issue. You can come in contact with the ACF Team and discuss the solution. You can also have a look into the admin area of my real estate web page and make any checks you need.

3- In the "Post Relationship" section, when editing a property (in the admin area) I have three fields: Town, Area and Owner.
Area is child of Town, so when I select a Town, it should only allow to select the Areas that are child of the selected Town, but you can select any Area in there. This should be fixed.
If there is anything I can do to make it behave like that, please tell me. Otherwise please give me a fix for that.

4- Another thing that doesn't work correctly: 'Show number of entries on "At a Glance" admin widget.'
When editing the custom post type for "Properties", on the right side of the page there is an option with a checkbox saying:
'Show number of entries on "At a Glance" admin widget.'
If I activate that checkbox and save, then in the dashboard widget it says that there is 1 property... and not the real number of properties.
In another post type "Towns", it shows the sum of the total number of towns from all languages, which is also a false number. It should show the number of elements of the current language only. I use WPML for multi language functionality, so you'll know how to fix it as it's from your same family product.

5- I can see the following block of errors in my error_log file. These lines are not added every time the page loads. The last time I saw this in the logs is the 14th of March.
When the entries are added to the error_log file several times, each block has these amount of lines.

PHP Warning:  array_merge() expects at least 1 parameter, 0 given in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 333
PHP Warning:  Invalid argument supplied for foreach() in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 334
PHP Warning:  array_map(): Argument #2 should be an array in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 349
PHP Warning:  array_map(): Argument #2 should be an array in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 350
PHP Warning:  array_filter() expects parameter 1 to be array, null given in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 351
PHP Warning:  array_map(): Argument #2 should be an array in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 352
PHP Warning:  array_merge() expects at least 1 parameter, 0 given in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 333
PHP Warning:  Invalid argument supplied for foreach() in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 334
PHP Warning:  array_map(): Argument #2 should be an array in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 349
PHP Warning:  array_map(): Argument #2 should be an array in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 350
PHP Warning:  array_filter() expects parameter 1 to be array, null given in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 351
PHP Warning:  array_map(): Argument #2 should be an array in /wp-content/plugins/wp-views/embedded/inc/classes/wpv-cache.class.php on line 352

Thank you.
Best regards

#378913

1. With just 300 posts Toolset should not become slow.
I administrate myself basic sites with more content, and no issues happen with Toolset only.

This problem I recall from translated sites, though, those should be solved in current WPML versions.

Please add your request for help in the WPML Forum as well.

For Toolset, this DOC gives great help on Performance and Parametric Search improvements:
https://toolset.com/documentation/user-guides/how-to-use-views-parametric-search-on-large-sites/

2. W3TC is VERY tricky and if set up wrongly it will SLOW DOWN your site instead of speeding it up, additionally most of times it conflicts with Toolset, as Toolset provides it's own cache mechanism, as above DOC also illustrates.

3. Regarding the ACF issue, I enable Private forms for access.

Please elaborate exact steps to see and replicate the issue.

I will disable all non Toolset Plugins (unless ACF) and use a default theme

Please ensure backups.

4. In the "Post Relationship" section, when editing a property (in the admin area) I have three fields: Town, Area and Owner.

Fields or Post Types Child of Property?
As per below those are posts, not fields. Is this correct?

Area is child of Town, so when I select a Town, it should only allow to select the Areas that are child of the selected Town, but you can select any Area in there. This should be fixed.
If there is anything I can do to make it behave like that, please tell me. Otherwise please give me a fix for that.

I need clarification on this, as best case, a new ticket is needed according our Support Policy, one for each issue:
https://toolset.com/forums/ > Support Policy

5. Another thing that doesn't work correctly: 'Show number of entries on "At a Glance" admin widget.'

This is known issue, and we will provide the fix in our next release.

6. The errors you see are not reproducible locally and either due to some custom code issue or compatibly issue or corrupted Plugins/DDBB entries.

For this I will need a Site's snapshot or Full SFTP Access and a way to reproduce this, if possible.

As I will not be allowed or able to handle all issues in this thread, lets open new threads for each issue as per the Company policy (I apologize this inconvenience) and handle the Issue #1 here?

Please let me know if the Settings suggested in the Performance DOC will bring alleviation, and also consult with the WPML Support this issue.
There are also DOC's for WPML performance:
https://wpml.org/2012/01/can-your-site-run-faster/
https://wpml.org/2011/03/wpml-with-w3tc/

Also we need to know, when the issue disappears (on deactivation of which plugin or setting)

Please don't hesitate to inform me in case the issue persists
and could you provide me the additional Infos?

Thank you for your patience.

#379367

1. I've also made some tests such as deativating plugins, change theme to twenty sixteen, but I cloudn't conclude how to solve my problem. The admin and public site was slow anyway.

Does that mean, even without Toolset or WPML the site is slow?

This is important to know.
It is elaborated specially in the WPML performance DOC to test this as well.

2. What I noticed is that ACF Gallery Field drag and drop feature works when I deactivate the AVADA theme and activate the twenty sixteen theme.

This needs a new ticket
As it seems this is not even related to Toolset, if I understand correctly?

Also all other issues require new Tickets, I apologize this

I see your site loads in 3,xx seconds, 180 Queries, nothing unusual here.
This can be expected with WPML and WordPress.
(backend)

Front end is a bit more concerning, 512 Queries and almost 5 seconds.
(as admin)

3. Your wp-config.php presents customized details.
One of them is weird:

// ACF Disable automatic updates check. It slows down WP Admin by 30sec. It cannot contact update servers. Comment this in the future to reactivate auto update feature
//define("OTGS_DISABLE_AUTO_UPDATES", true);

This has nothing to do with ACF, it's our own Update path.
Also, if your server rejects our URL paths, it may reject many other things and be the reasons for the slow down.

Some other customizations will probably conflict with CRED; when it comes to uploads.

4. W3TC is not set up on this site, otherwise wp-config.php would present it's rules:
hidden link

5. Disabling all Plugins, this error happens:

 Fatal error: Call to undefined function acf_form_head() in /home/abbeyinmo/public_html_project/wp-content/themes/abbey/functions.php on line 393

6. You have a Theme "Abbey" running, but use Toolset layouts + AVADA integration.
Is this CHILD of AVADA working fine with the integration?

7. Reenabling Plugins, took a while.
This without having WPML or Toolset active at all.

Each plugin activation loads seconds over seconds.
(Front End is remarkably faster though without any Plugins at all)

8. It seems to me your Server is not properly configured. Activating many plugins a time (to stress execution time) returned a E 500 being clear that this is a Server timeout.

9. having reactivated all Plugins, I got the site down to 3 seconds on front end as logged user.

10. Disabling only WPML, split down the Queries to half but load time jumps up to 5 time as long.
Are you using some hardcoded calls to WPML functions, that are not wrapped in conditionals, to check if the plugin is active?

11. Additionally deactivating all Toolset Plugins, brought it down to a very acceptable speed of less then a second.

12. Reactivating only WPML Plugins bought it up back to 3.5 seconds, (which is expected with WPML)

13. Locating the culprit here was then easy:

- One part is WPML, please open a ticket with the Support of WPMl and follow their instructions
- The Other, generating never 300 queries and 1.5 seconds load time only is Views.

You load 2 quiet big Parametric Searches on the Home.

The Views not only query 300+ posts with lots of Queries but also include relative much HTML conditionals.

This can be the reason this is so slow.

I could escalate it to the DEV for analyzation but I can not promise any fast solution, as it is at least partially expected what is happening here.

Additionally I see slow Queries (and those are the only one reported) by another Plugin along with Views:

Fusion Core.

And Views is, as suspected, slow due to the numerous Filters and conditionals, you can see that in the Query reports.

So, to summarize, I personally would suggest to change some setups here, as this will not bring much improvement with Cache or similar as you want a Parametric Search to be uncached of course.
Additionally, Cache is automatically turned off for Views when:
WPML is active, since the same View can produce different results for different languages.
https://toolset.com/documentation/user-guides/how-to-use-views-parametric-search-on-large-sites/

So, you can not any way use Views cache.
Also with as many conditionals and queries, it is expected to slow down the process.

I am not saying we can not improve.
I will if you request, involve the DEV here.

Please let me know your findings and if you agree.

If I escalate I will need a way more minimal Site, no Plugins but Toolset and WPML, to provide to the DEV.
Can you provide me a snapshot of such a site ?

Thanks for your patience and understating in this.

#379373

Please also try this:

Change the parametric search settings to "Choose individual setting manually", and check the option to "Always show all values for inputs".
This should remove the extra queries.

Thanks

#385845

Hello,
sorry for answering so late, but I've being very ill and I couldn't work on this.

During these days WPML and Toolset released updates. I applied the updates and now the site is relatively fast. Between 2 and 3 seconds of load times most of the time, without caching plugins.

Also ACF Gallery plugin drag and drop now works correctly.

Today I also updated to WordPress 4.5 and I feel it's slightly faster too. The problem now is that the Google map now doesn't show anymore. I think I have to open a new ticket for that... All the rest seems to work.

Thank you very much for all your support.

#418705

Hello,
the site is still slow overall.
I've setup a test site for debugging so you can have a look. Please activate the next post as private and I'll give you access details to cPanel account, FTP and WordPress admin user.
I tried many things such as deactivating all non Toolset plugins or changing the theme to twenty sixteen, but the site keeps using too much RAM and CPU.
It's a real estate site with just near 250 properties. It shouldn't be that slow.
I've installed the "Query Monitor" plugin too.

Thak you very much.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.