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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 15:00 7:00 – 15:00 7:00 – 15:00 7:00 – 15:00 7:00 – 15:00 -
- - - - - - -

Supporter timezone: Pacific/Easter (GMT-05:00)

Tagged: 

This topic contains 62 replies, has 3 voices.

Last updated by Ilyes 5 months, 1 week ago.

Assisted by: Ilyes.

Author Posts
May 7, 2024 at 11:10 am #15601388

arildB

Hi
We have problem with that WPML consumes a lot of memory.

07-May-2024 10:48:44 UTC] PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 262144 bytes) in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php on line 56

Can you please have a look?

It's also not possible to swap between No and ENG without login in again.

Cheers

Kind regards
Arild Bekkelund

May 7, 2024 at 5:10 pm #15603341

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello Arild,

Thank you for contacting WPML support team,

Have you recently perform and database or site migrations?

Or have you changed to PHP 8.1 recently?

Finally, this could be caused by another plugin as we had this case before with BoddyPress, please run a backup of your site and try this solution :

https://wpml.org/forums/topic/wmpl-buddypress-plugin-gives-issue-with-our-site-chat-got-closed/page/2/#post-14073963

If that's not the case, check if the issue persists in a minimal environment by following these steps:
1- Deactivate all the plugins except WPML CMS.
2- Switch for a moment to a WordPress default theme like Twenty Twenty-one.
If the issue is gone, activate them one by one to see which one there is causing an interaction issue.

Best regards,

May 8, 2024 at 9:13 am #15605103

arildB

The solutions over didn't do anything.
We suspect that there is a memory leak due to Object cache incompatibility. This error is triggered on nearly every page:

8-May-2024 08:21:01 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
[08-May-2024 08:22:02 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
[08-May-2024 08:23:02 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
[08-May-2024 08:24:02 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
[08-May-2024 08:25:02 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
[08-May-2024 08:26:02 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
[08-May-2024 08:27:02 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
[08-May-2024 08:28:02 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
[08-May-2024 08:29:02 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
[08-May-2024 08:42:02 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
[08-May-2024 08:51:02 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
Loading...

May 9, 2024 at 1:55 am #15608105

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello,

It seems to be an issue with the single sign-on option when using different domains per language.

Do you see a problem with saving this option in WPML > languages > language URL format?

Do you have any kind of security plugin or system like Mod_security, if yes, this is coming from the hosting/domain side and not caused due to a bug in WPML's code :

https://wpml.org/forums/topic/php-errors-403-errors/#post-15186543

As you said Object cache could also be a potential cause of this, one way to to test this is to simply disable it and check if the issue replicates.

Here is a similar case with a potential solution :

https://wpml.org/forums/topic/403-forbidden-after-admin-login/#post-14620517

From the WPML side, WPML needs to be able to send data cross-domain via POST or GET method in order for login data to be passed to other language domains and for you to stay logged in or not get a 403 error.

- https://wpml.org/documentation/getting-started-guide/language-setup/passing-session-data-between-languages-in-domains/

Best,

May 9, 2024 at 2:03 am #15608127

arildB

Hi again
The problem is not there when Object cache is disabled. When OB cache is enabled, WPML is eating all the cache (we have added tons of memory) and the sites crash when the queries work through the disk.

May 9, 2024 at 3:33 am #15608219

arildB

Additional info. We are running PHP 8.1, but have done this for for a couple of months. Is there any problems with 8.1?

May 9, 2024 at 4:48 am #15608432

arildB

Hi again
We have rolled back to PHP 8.0 now, and monitoring whats happening. A possible cause og the header warning could be patchstack as header manipulation looks very much as attacks.

Still we have problems with the news stream in Buddyboss. On the English translation it's empty. How can we fix this?

May 9, 2024 at 11:09 am #15610097

arildB

Rolling back to PHP 8.0 didn't do the trick. Still leaking memory and the site go down.

So whats the next move?

May 9, 2024 at 11:11 am #15610128

arildB

Forgot to say that we now are able to switch between languages without log in again.

May 9, 2024 at 3:51 pm #15611467

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello,

As of PHP 8.1, this version is compatible with WP 6.5 but with exceptions as shown in the official WP documentation : https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/

But that shouldn't be the problem here, I've checked and you might be facing the same issue as this one https://wpml.org/forums/topic/conflict-with-wpml-and-object-cache-pro/#post-13747629

Could you try the steps explained in that ticket and see if it helps? Ref: hidden link

This will let Object Cache exclude individual cache groups from being store in Redis.

I hope this fixes your issue,

Best,

May 11, 2024 at 12:51 pm #15616998

arildB

I'm sorry, but WPML still leaking memory. Have added the following to define WP_REDIS_CONFIG',
'non_persistent_groups' => [
'counts',
'plugins',
'themes',
'bp_pages'
],
But it doesn't seems to do much.
So what are the next move? We are unfortunately in a bit of hurry to solve this.

Cheers
Arild

May 13, 2024 at 11:02 pm #15622677

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello,

The next move would be escalating this to our 2nd tier team, I would like to ask for temporary access to your staging or live site’s wp-admin and FTP to investigate the issue further.

Kindly provide me with the steps on how to replicate the problem.

If necessary, I may need to replicate your site locally. To do this, I will temporarily install a plugin called “Duplicator” on your site, which will enable me to create a copy of your site and its content. Once the problem has been resolved, I will delete the local site. Please let me know if you agree to this.

It is important to note that you should back up your site and database before proceeding, and you can use a plugin like Duplicator for this purpose. Here’s a link to the plugin: http://wordpress.org/plugins/duplicator/

If you do not see the form below, please do not enter your credentials as they will be publicly exposed:

hidden link

For your privacy and security, please ensure that you make your reply a private one.

Best regards,

May 17, 2024 at 4:20 pm #15640498

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hi Arild,

Unfortunately the password you shared doesn't work for me, you might have pasted the wrong password,

I will be waiting for the new credentials,

Thanks,

May 20, 2024 at 7:18 pm #15647250

arildB

Hi
Have you had time looking into this?

May 21, 2024 at 2:30 am #15647634

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello,

Thank you for the access,

I have installed a copy of your site locally for further debugging, this is to avoid affecting your live site,

As for now, I might need to escalate this to our second tier, I will get back to you shortly with updates,

Best,

The topic ‘[Closed] Fatal Error: WPML consuming a lot of memory’ is closed to new replies.