[Resolved] 504 errors when updating Formidable forms
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing a 504 timeout error when updating Formidable Forms on their site. This issue is traced back to the WPML string registration process, specifically the
wpml_register_single_string
function, due to a large number of translation strings (over 90,000) in the WPML database. Each form save processes this entire collection, exceeding the server's PHP execution timeout limits. Solution: 1. Update the WPML main plugin to version 4.8.5 for performance improvements. Instructions for updating can be found at https://wpml.org/faq/install-wpml/#automated-updates. 2. Increase the PHP memory limit to at least 512M. Add the following code to the "wp-config.php" file:
3. Optimize the String Translation table via WPML > Support > Troubleshooting in the WordPress Dashboard. 4. Test the site on a staging version and deactivate all plugins except WPML Multilingual CMS, WPML String Translation, Formidable Forms, and Formidable Forms Multilingual to check if the issue persists. 5. If necessary, consider upgrading to a higher tier of hosting resources.
If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your specific case, we recommend opening a new support ticket. We also 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. For further assistance, please visit our support forum at https://wpml.org/forums/forum/english-support/.
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.
Background of the issue:
I am trying to update Formidable forms on my site, but the request times out with a 504 error. I debugged the issue on a staging site and found that the problem is related to the Formidable Multilingual plugin. The issue is traced to the WPML string registration process, specifically the wpml_register_single_string function. My site has over 90,000 translation strings in the WPML database, and each form save processes this entire collection, exceeding the server's PHP execution timeout limits. The hosting environment has strict timeout policies, preventing adjustments to PHP execution time limits.
Symptoms:
504 error when updating Formidable forms due to WPML's string registration process causing significant delays.
Questions:
Do you have any suggestions to optimize the string processing for the site to solve the 504 error?
Welcome to WPML support. By updating Formidable forms you mean from the front end you edit a form and save? Or you mean updating the Formidable forms plugin?
What I can suggest at this time is to update WPML main plugin to version 4.8.5 as it has many perofrmance related updates:
- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Go to "WordPress Dashboard > Plugins > Add new > Commercial (tab)".
- Click the "Check for Updates" button.
- Update WPML and its addons there.
- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Go to "WordPress Dashboard > WPML > Support > Troubleshooting (link)".
- Click the Optimize String Translation table option.
- Do not touch other buttons.
Thank you. One other suggestion and after that I will need to ask for staging website login information.
- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except:
. WPML Multilingual CMS
. WPML String translation
. Formidable Forms
. Formidable Forms Multilingual
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.
If the issue persists, I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
Please give the staging version login info and not the live website so we can do troubelshooting wiht no problem.
Make sure you set the next reply as private.
And finally, We need to ask your permission to copy your website to our server if needed.
Thank you I logged in to the website but I am blind as I am not sure which one is the problematic. As an example, I checked Asset request and it worked ok.
May I ask you to give me the exact URL of the form that has the issue?
Also if there is any sort of specific entry criteria that I need to add to the form to see the issue?
The timeout issue is occurring when on any form. All that you need to do to trigger the timeout is edit any field on the form. I've been testing by adding/removing characters in the field label and saving which causes the timeout.
Thank you. I am working on this. The website is very slow and even does not allow me to deactivate the plugins at once. I will get back here as soon as I have something to share.
Ok I managed to deactivate all the plugins except WPML Multilingual CMS, WPML String Translation, Formisdable Forms, Formidable Forms Multilingual.
Now changing form works with no issues.
This shows that there is not an ingerit issue when it comes to the WPML usage. The issue is that there are many plugins on your website and the hosting sever fails to respond to all of them.
I tried again and it does work albeit its very slow. So the issue is the site has too many plugins activated which is causing the 504 errors? Outside of removing plugins is there no way to optimize the string processing so it will work with the amount of plugins the site has?