Skip Navigation

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.


This topic contains 83 replies, has 5 voices.

Last updated by George Botsev 2 years, 3 months ago.

Assigned support staff: Andrés.

Author Posts
July 31, 2018 at 3:56 pm #2599043


I am trying to:
Delete Images in bulk, Upload new images, Add/edit pages and products (WooCommerce)

Link to a page where the issue can be seen:
/wp-admin/ (various)

I expected to see:
The default behaviour.

Instead, I got:
Error 504 Timeout.

I have drilled this issue down to WPML. Steps to reproduce the issue:
1) Deleting Images: We had a bulk of images, when we delete them in bulk, it stops. Error 504 triggers in the background, from the apache log:
104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
500#0: *116 upstream timed out (110: Connection timed out) while reading response header from upstream
The only way to bring the website back is to restart the entire server, restarting Apache alone does not bring the site back.
The issue reoccurs each time we try to delete images in bluk and frequently occurs when updating/editing content.
We notice stale connections ('sleep') hanging on our database and they remain there, those sessions don't ever terminate! With WPML off, we get NONE of these issues at all!

We tried:
1. Switching Themes
2. Turning off all custom plugins
3. Turning off wp-cron.php functionality
4. Downgrading PHP to version 7.1 from 7.2
5. Increasing Timeout limits on Apache
6. Increasing allowed memory to 2GB
7. Disabling All caching
---None of these made any difference to the problem--

We're willing to try anything at this stage! Our website is live now and is frequently being rebooted to stay alive, at

August 1, 2018 at 2:28 am #2600507

Shekhar Bhandari

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for contacting WPML support. I'd be happy to assist you further on this issue.

How many images are your trying to delete at once? If you reduce the number of images and delete it in parts does the issue exists?

Also, could you please increase your MaxInputVars to 5000 and let me know if this helps?

Look forward to your reply.


August 1, 2018 at 8:13 am #2600910


Hi @shekhar,
We're trying to delete about 30+ (between 30 and 80) at once but only as a test, point being when we delete this number without WPML activated, it is able to do the full 80 no problem.
When we reduce the amount of images in grid view it does not seem to work however it will in list view.

I have changed the MaxInputVars as requested but the issue remains...

The issue is to do with the amount of connections WPML is making to the database that don't terminate properly or in some cases at all. They keep connecting in the state "sleep".

We've updated to to the latest version of WMPL too and the issue remains.

Can you advise?


August 1, 2018 at 1:03 pm #2602018


Is there a chance I could get support from someone in the United Kingdom timezone?
This issue is causing problems on a live ecommerce website and is creating us many other concequences as a result of being broken.

August 1, 2018 at 2:30 pm #2602362


Hi, Amit here,

I am the WPML support manager.

I am reassigning the ticket to an EU timezone supporter.

As for the issue - error 504 is a timeout on the server - the best approach would be to delete fewer images or contact your hosting to increase the limits.

You might be using a proxy that connects to another server and the first one did not wait for the last one to complete the request.

Please note - when you try to delete X images in bulk you are actually deleting X images by Y languages --> so following your example: deleting 30-80 images in bulk means actually for the server, (using 4 languages) 120-320 images sent for deletion which is just too much.

Please let us know if you managed to contact the host for increasing the limits.


August 1, 2018 at 2:47 pm #2602445


Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+01:00)

Hello there,

This ticket has been re-assigned to me. 🙂

Please, let me know your findings after contacting your hosting provider as it was indicated by Amit.

Best regards,

August 1, 2018 at 3:18 pm #2602510


Hi Andrés,
Our hosting provider has said that the "aplication" is the cause by opening too many connections to the database, they have sent me the following:

| Id | User | Host | db | Command | Time | State | Info | Progress |


| 2159095 | sbc1 | localhost:34834 | sbcgels_main | Sleep | 173 | | NULL | 0.000 |

| 2159099 | sbc1 | localhost:34856 | sbcgels_main | Sleep | 173 | | NULL | 0.000 |

| 2159100 | sbc1 | localhost:34868 | sbcgels_main | Sleep | 173 | | NULL | 0.000 |

| 2159108 | sbc1 | localhost:34938 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159109 | sbc1 | localhost:34944 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159110 | sbc1 | localhost:34950 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159114 | sbc1 | localhost:34976 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159128 | sbc1 | localhost:35120 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159129 | sbc1 | localhost:35126 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159130 | sbc1 | localhost:35128 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159134 | sbc1 | localhost:35152 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159136 | sbc1 | localhost:35166 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159138 | sbc1 | localhost:35170 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159140 | sbc1 | localhost:35174 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159142 | sbc1 | localhost:35178 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159149 | sbc1 | localhost:35196 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159151 | sbc1 | localhost:35200 | sbcgels_main | Sleep | 172 | | NULL | 0.000 |

| 2159286 | sbc1 | localhost:36040 | sbcgels_main |

*** Comment exceeds 32.0KiB in size. ***

Without WPML active, all of these terminate as they should...
I have been asked to try the following:
1) Reduce or eliminate unclosed connections and network issues

2) Adjust your join queries to always utilize indexes

3) When making adjustments, make tmp_table_size/max_heap_table_size equal

4) Reduce your SELECT DISTINCT queries which have no LIMIT clause

5) Set thread_cache_size to 4 as a starting value

I understand the images would be multiplied by 4 each time I delete some, but the setting in WPML is set to duplicate images for all languages, we only ever upload images in 1 language...

The image example above is simply a way in which I can reproduce the error quickly, it is not genuinley what we are trying to do when this issue occurs. This issue occurs at complete random on our users when updating products, posts or pages too. We've even seen customers get served the 504 error instead of cache at one point.

Kind Regards

August 1, 2018 at 5:12 pm #2602882


Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+01:00)

If I understand correctly, your problem is not really about removing images but about updating products, is it the case? This will help us to focus on the real problem.

On one hand, you are handling a robust installation (more than 60 active plugins) including WooCommerce and WPML, and it is translate it into 4 languages. Under this scenario we need to check if your server is suit for it.

1. Could you please confirm if you have increase your MaxInputVars?

2. It would be good if you can provide me the WordPress debug.log (not WPML debug informations).

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );

In this case the errors will be saved to a debug.log log file inside the /wp-content/directory.

If you can paste your debug.log to and provide me that link it would be great! (This is the cleanest way, because sometimes the logs are long and create a complete mess in discussion).

3. On your test site, please check if this issue appears when:
- Only WPML and WooCommeerce are the only plugins activated. It will tell us if there is an interaction issue with other plugin.
- Theme is set to a WordPress default like Twenty Fourteen. Its will tell us if there is an interaction issue with your theme.
- If the problem disappears, start activating one at the time to track where the incompatibility is produced.

August 2, 2018 at 1:37 pm #2605481


Hi Andrés,

I've been running all the tests to make sure it's all ok, the debug.log file doesn't get written to whe this error occurs, I have a blank file.

I have disabled all plugins apart from WooCommerce & WPML and the issue remains, it goes away when WPML is disabled (even with everything else enabled) as I mentioned previously.

Going back to what I sent over previousy from our hosts, it appears to be the connection to the database getting congested, this is due to sessions going stale, is there any way to amend database sessions in WPML?


August 2, 2018 at 2:31 pm #2605697


Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+01:00)

Hello there,

If the issue is still happening when only WPML and WooCommerce are activated, there is something else happening.

1. Could you please confirm that the issue appears when you update a product?

2. I would like to request temporary access (wp-admin and FTP) to your test site to take a better look at the issue. Could you please indicate me how to replicate this behavior?

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok for you.

*Important: Be sure to backup your site and database first before you proceed!
You can use a plugin for this if you like. You can use the Duplicator plugin for this purpose.

If you don't see the form below, pelase don't add your credentials as they will be publicly exposed:
hidden link

Privacy and Security when Providing Debug Information for Support:


August 2, 2018 at 2:43 pm #2605801


Before I grant this, I will need to know your public IP address so I can authorise your incoming connection to our test server.
Kind Regards

August 2, 2018 at 2:55 pm #2605847


Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+01:00)

My current IP is

August 2, 2018 at 4:07 pm #2606145


Apologies for the delay, we are experiencing issues sharing the server with you, we shall send you details once it's up and running on the internet.

August 2, 2018 at 4:45 pm #2606236


Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+01:00)

No worries, I know that sometimes setting a staging server can be tricky, especially with this weird error.

Next message will be private for when you are ready.

August 3, 2018 at 8:32 am #2608268


Hi Andrés,
I can't seem to send a response privatley for some reason?