We migrated from WPEngine to Hostinger Cloud, and after some time, we encountered an issue where the website took too much time to load. Upon checking the error logs, we found that there were database errors related to WPML. As a result, we reverted back to WPEngine, where everything is functioning properly. I would like to understand the significance of this database error and how we can go about resolving it.
Error : WordPress database error Commands out of sync; you can't run this command now for query - see attached image
Out of sync errors are not really "WPML errors" but i can see why these problems could happen when WPML was making some database calls.
There are times when the site needs to make a lot of database calls, maybe just for a moment (when you update a plugin, or there are new things on the site, for example).
As you could see in the thread, this error happens when new queries are sent when old ones haven't finished yet. This could mean so many things:
- The hosting has a restriction on queries per second which makes the queries behave slower than what it needs. you could try your hosting about query limits, database restrictions, etc.
- The site has some cache and is trying to run queries of things it had already processed. flushing the cache on the server and the site would help here.
- There are simply too many queries that your server can't handle at the moment
- The server could be overloaded or your plan doesn't have enough resources to handle all these queries.
This could also be temporary, however i suspect this issue could actually disappear with our beta version, since String Translation could be making excessive calls at the moment, which is an issue that is happening to some specific sites and that we fixed in our new version of WPML and String Translation.