[Resolved] Menu sync time out issue - workaround or Patch?
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing timeouts with Cloudflare when using WPML to synchronize and translate menus due to high resource usage and extensive database queries. This issue is exacerbated by the n+1 query problem with a large number of menu options and languages. Solution: We recommend the following workarounds to address the timeout issue: 1. Manually translate the menu to avoid triggering the resource-intensive synchronization process. 2. Temporarily disable Cloudflare while running the menu synchronization or translation process, which will prevent Cloudflare from stopping the request. 3. Consider upgrading to Cloudflare Pro, which allows for a higher timeout limit (up to 100 seconds), potentially preventing these interruptions.
If these solutions do not resolve your issue or seem outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum for further assistance.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
I am sorry but i really don't follow you.. are you suggesting to remove all those plugin? Even if you disable it short time, the site will break instantly... how can this to be a solution?????
Here is the answer from our 2nd-tier specialists about this scenario:
Cloudflare has limits that cannot be raised.
You can try raising the limits on the Kinsta hosting - increase both memory and max exec time in the PHP settings.
Having more memory could potentially help, but ultimately it falls back to Cloudflare and its timeout, and it requires a professional account -> hidden link
If you ask me, it would be better to check for a workaround (pick one):
- Translate the menu manually
- Disable temporary Cloudflare and run the process
- Upgrade to Cloudflare Pro account and tweak the 100s. limit
I kindly ask you to try all the steps mentioned and let me know if you were able to sync the menus.
Hi Jasmin,
we at Casarista are facing the exact same WPML Menu Sync issue: the AJAX call to `/wp-admin/admin-ajax.php` with `action=icl_msync_confirm` runs for a long time and then times out (in our case via Cloudflare/edge, so the sync UI shows no progress and never finishes). This happens even when syncing only a single menu item.
What we already tried (no success):
* Ran all WPML → Support → Troubleshooting actions (clear WPML cache, remove ghost entries, fix WPML tables/element_type collation, set language information, etc.)
* Confirmed “Database Tables Optimization” isn’t available for us anymore / shows as already optimized
* Tested on staging with a default WordPress theme and with all our custom plugins disabled (so no custom code involved)
* Increased relevant PHP limits (execution/input time where possible) — still hits the timeout
* Tried the workaround/patch approach mentioned in this thread (https://wpml.org/forums/topic/site-speed-above-4mins-when-working-on-menu-sync/#post-16325975) — didn’t solve it for us either
So from our perspective, upgrading Cloudflare (e.g., to Pro) wouldn’t solve the root cause, because the menu sync job itself appears to be too slow/inefficient and exceeds typical proxy timeouts. If anyone has found a reliable workaround (batching, WP-CLI, a proper patch/fix), we’d be very interested.
1- As I said, manual sync is NOT working, and I was asking for help. See my reply #17636552
2- I also mentioned in the thread that we ARE already a PRO version of CLF. Only an enterprise has that option to increase to that extent.
3- We did try, still the same problem.
@Gorge-7
Thanks for testing. We already optimized the DB as advised by Paola (written in this thread) but no change at all.
We are struggling big. The site is struggling with WPML itself: it's not only menu sync, including manual sync, but also it's disturbing site behaviour, such as not responding correctly, loading super slow, losing translation altogether.. I won't address all these here, but my point is, we have BIG problems with WPML...
Please help...
We are taking a deeper look at this issue. I'm consulting directly with our 2nd tier of support to see if we can find a different workaround for this scenario.
just to add a perspective from our side at Casarista:
We had a very similar situation some time ago where WPML felt extremely heavy (slow backend, weird behaviour, etc.). Right now we don’t have general performance problems anymore – mainly because
* we’re using caching very efficiently, and
* we found and fixed a couple of WPML-related issues in our setup (for example a `Set-Cookie` header loop that caused unnecessary load).
If you’d like, we can compare setups and findings and see whether some of our fixes are relevant for you as well. You can book a short call with me here:
[hidden link)
Hello @georgeW-7
Thanks for your answer! Greatly appreciate it.
I took a look at those articles using translation. Honestly, I am not the right person for that area (code, etc) so I will let our colleague (developer) know about it, and will come back to you.
By the way, so the menu sync is not solved yet?
Please share the access credentials to the live site so I can create a copy and send it to our 2nd tier of support, because the staging site is not working and the credentials shared are not working on the live site.
Looking forward to your message and Happy New Year!