• Resolved Jamie Madden

    (@digitalchild)


    Hi Team,

    Sending a password reset link to users from the user edit screen results in a fatal error on the site. I’ve stripped our identifiable information if you need more info, happy to help debugging.

    2022/03/05 04:15:35 [error] 20102#20102: *1539364 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /www/site/public/wp-includes/meta.php on line 1190PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /www/site/public/wp-includes/class-wp-fatal-error-handler.php on line 72" while reading response header from upstream, client: 171.250.184.97, server: www.site.com, request: "POST /wp-admin/admin-ajax.php?_fs_blog_admin=true HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7.4-fpm-site.sock:", host: "www.site.com:26206", referrer: "https://www.site.com/wp-admin/user-edit.php?user_id=12345&wp_http_referer=%2Fwp-admin%2Fusers.php%3Fs%3Dusername%26action%3D-1%26new_role%26bbp-new-role%26bbp-bulk-users-nonce%3Dc247b42655%26ure_add_role%26ure_revoke_role%26primary_role%3Dmatomo_superuser_role%26paged%3D1%26action2%3D-1%26new_role2%26bbp-new-role2%26ure_add_role_2%26ure_revoke_role_2"

    Disabling Matomo plugin resolves the issue.

    Anyone else seeing this?

    cheers,

    Jamie.

Viewing 14 replies - 1 through 14 (of 14 total)
  • mattmary

    (@mattmary)

    Hi @digitalchild

    Can you share with us your system report available from the Matomo Analytics > Diagnostics menu?

    Kind regards

    Mat

    mattmary

    (@mattmary)

    hi @digitalchild

    any chances you read my previous comment?

    Kind regards

    Mat

    Thread Starter Jamie Madden

    (@digitalchild)

    Hi @mattmary

    Apologies for the delay. Is there somewhere I can email the system report?

    cheers,

    Jamie.

    mattmary

    (@mattmary)

    hi @digitalchild

    sure. you can email it at [email protected]

    Kind regards

    Mat

    Thread Starter Jamie Madden

    (@digitalchild)

    Hello,

    I’ve emailed the report.

    cheers,

    Jamie.

    mattmary

    (@mattmary)

    Hi @digitalchild

    I cannot reproduce your bug.
    Can you try to increase your memory limit ?
    Kind regards

    Mat

    Thread Starter Jamie Madden

    (@digitalchild)

    Hi Matt,

    How is 256MB of memory not enough for the plugin? I’ve installed new relic and will do a bunch more tests and see what I can find. Will report back when I have something.

    cheers,

    Jamie.

    Thread Starter Jamie Madden

    (@digitalchild)

    With new relic enabled, I’m able to replicate the issue and it appears that something within the sync class

    in WpMatomo\User\Sync::sync_current_users_1000 called at /wp-content/plugins/matomo/classes/WpMatomo/User/Sync.php (69)

    When Matomo is not activated, we get no fatal error, so something in that is causing an issue.

    I’ll continue digging to see if I can find what is happening in the sync calls, that might be causing it.

    cheers,

    jamie.

    mattmary

    (@mattmary)

    Hi @digitalchild

    Thanks for investigating.
    256 M is enough for the plugin to run but the memory consumption depends also of the others plugins installed and the amount of data you have.
    Do you have a lot of user accounts?
    Kind regards

    Mat

    Thread Starter Jamie Madden

    (@digitalchild)

    Hi Mat,

    The site has over 20k users. Without reading the Matomo source, I’m assuming the sync tool is going through all users?

    I’ll keep the staging site up if you have anything else you need me to do / break / test.

    cheers,

    Jamie.

    mattmary

    (@mattmary)

    hi @digitalchild

    the user accounts are synchronized only if there are less than 1000 accounts. otherwise this is a background task which synchronize the accounts.
    My understanding is the SQL query which collect the users accounts number fetch all the user accounts data and this is why you get this error.
    I’ve created this issue https://github.com/matomo-org/matomo-for-wordpress/issues/587
    feel free to subscribe to it to get notifications when it will be solved

    Plugin Author Thomas

    (@tsteur)

    @digitalchild any chance you are familiar with patching files in your WordPress installation? We have a patch that may fix this issue but would need to get this confirmed.

    In case you are familiar with patching files or PHP, could you try to apply this same change from https://github.com/matomo-org/matomo-for-wordpress/pull/588/files the file wp-content/plugins/matomo/classes/WpMatomo/User/Sync.php ?

    Or you could replace the entire content of that file with this content: https://raw.githubusercontent.com/matomo-org/matomo-for-wordpress/acb360040cc57298f8e8d8ef334f3bd09e40fa70/classes/WpMatomo/User/Sync.php

    Hi @digitalchild

    Any chances you read our previous message?

    Kind regards

    Mat

    Thread Starter Jamie Madden

    (@digitalchild)

    Hello,

    I’ve patched and confirmed I’m no longer getting the fatal error. Thanks!

    cheers,

    Jamie.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Fatal error on send password reset’ is closed to new replies.