Mail Chimp Sync

I have upgraded the plugin and it still will not work. It times out, according to the logs. What to do?

  • Thomas

    2016-09-04 21:01:52 GMT nope 198.12.149.231 lists/interest-groupings json 0.046s MailChimp-PHP/2.0.4 2.0 (211) List_InvalidOption
    2016-09-04 21:01:52 GMT nope 198.12.149.231 lists/list json 0.049s MailChimp-PHP/2.0.4 2.0 n/a
    2016-09-04 21:01:51 GMT nope 198.12.149.231 helper/ping json 0.02s MailChimp-PHP/2.0.4 2.0 n/a
    2016-09-04 21:00:05 GMT nope 198.12.149.231 lists/batch-subscribe json 4.185s MailChimp-PHP/2.0.4 2.0 n/a
    2016-09-04 21:00:00 GMT nope 198.12.149.231 helper/ping json 0.011s MailChimp-PHP/2.0.4 2.0 n/a
    2016-09-04 20:59:53 GMT nope 198.12.149.231 lists/list json 0.042s MailChimp-PHP/2.0.4 2.0 n/a
    2016-09-04 20:59:53 GMT nope 198.12.149.231 helper/ping json 0.015s MailChimp-PHP/2.0.4 2.0 n/a
    2016-09-04 20:55:41 GMT nope 198.12.149.231 lists/list json 0.053s MailChimp-PHP/2.0.4 2.0 n/a
    2016-09-04 20:55:40 GMT nope 198.12.149.231 helper/ping json 0.014s MailChimp-PHP/2.0.4 2.0 n/a
    2016-09-04 20:55:11 GMT nope 198.12.149.231 lists/interest-groupings json 0.043s MailChimp-PHP/2.0.4 2.0 (211) List_InvalidOption

  • Nastia

    Hello Thomas , I hope all is well!

    Would you lease let me know, are you trying to synchronize your MailChimp lists and WordPress users? In this case, have you created a Webhook?

    Or these errors shows up when a users want to subscribe to a mail list?

    Would you please grant access from WPMU DEV > Support so I can have a closer look?

    Please see the detailed instructions on the link below:
    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please advise,

    Cheers,
    Nastia

  • Nastia

    Hello Thomas ,

    I see that the max execution time is set to 30 sec. Would you please increase this value to 300?

    Add the following to your .htaccess file:

    php_value max_execution_time 300

    If the above will not work, you can add the following to php.ini file. If you do not have php.ini, feel free to create in the root of your WordPress site directory.

    max_execution_time = 300

    More detailed instructions you will find here: How to Increase the Maximum Upload and PHP Memory Limit in WordPress

    Let me know if you need any further assistance here!

    Cheers,
    Nastia

  • Nastia

    Hello Thomas ,

    htaccess mod crashed the site

    Would you please let us know what error you saw when your site has crashed? Please try and set a lower value like this, inside your .htaccess file:

    php_value max_execution_time 180

    If again your site has crashed, please sent to us your credentials so we could have a closer look.
    You can send credentials by using our secure contact form http://premium.wpmudev.org/contact/

    Subject: “Attn: Nastia”
    - WordPress admin username
    - WordPress admin password
    - Login URL
    - FTP credentials (host/username/password)
    - Link back to this thread for reference
    - Any other relevant URLs

    Select “I have a different question” for your topic - this and the subject line to ensure that it gets assigned to me.

    In case you increase maxim execution time successfully, and it's still not working , would you please deactivate all other plugins and try to import users again?

    Let us know how it went.

    Kind regards,
    Nastia

  • Nastia

    Hello Thomas , thank you for sending your credentials!

    Hope you're doing well today!

    To fix this issue, please edit the mailchimp-api.php file that is located in wp-content/plugins/mailchimp-sync/mailchimp-api/

    On line 27, please replace this line of code

    public $timeout = 600;

    and change it to this one:

    public $timeout = 5000;

    Let me know if this will fix the error you have.

    Cheers,
    Nastia

  • Thomas

    That didn't work. Not trying to be rude, but Im very busy. I have been dealing with this back and forth over the past couple weeks. granted, I have not been timely in my replies, because, I just don't get a lit of free time for this type of thing. At what point can you step up and log in and help me out? I pay for this service. it has been working fine until recent. Not sure what happened. Please help me with this. Its really starting to get annoying.

  • Nastia

    Hello Thomas , I hope all is well!

    I am sorry to hear that the solution didn't work for you. Since I did not have FTP credentials, I couldn't make these changes myself.

    As you mentioned in the email:

    - FTP credentials (host/username/password) let me know if you need this or I can upload whatever

    I don't have your FTP credentials to troubleshoot further. Would you please send them to me.

    You can send credentials by using our secure contact form http://premium.wpmudev.org/contact/
    Subject: “Attn: Nastia”

    - FTP credentials (host/username/password)
    - Link back to this thread for reference https://premium.wpmudev.org/forums/topic/mail-chimp-sync

    Select “I have a different question” for your topic - this and the subject line to ensure that it gets assigned to me.

    Kind regards,
    Nastia

  • Nastia

    Hello Thomas

    While importing users with the plugin the debug.log showed Fatal error:
    PHP Fatal error: Cannot use object of type WP_Error as array in wp-content/plugins/mailchimp-sync/helpers.php on line 128

    It is not a conflict with another plugin, so I have asked a second level support to have a closer look at this issue since there is no similar report of this error in our database.

    Once there is an update the developer or myself will update this thread.

    Kind regards,
    Nastia

  • Panos

    Hi Thomas ,

    Sincere apologies for delay!

    The reason for this seems to be that curl was timing out with such an amount of users. I tried changing CURLOPT_TIMEOUT in plugin files but it always gets set to 1000 ms, not sure if it has to do with server configuration.

    Therefor I decided to do some other modifications so the requests would be lighter and your server should be able to process without timing out.

    First change, instead of importing 200 users per time, I reduced it to 2

    When there is a failure, it now repeats 2 more times (3 in total). If still there is an error response it will return error to the javascript function.

    I have added cookies to store latest processed user count. This way you can return later and continue from the point you stopped.

    I also added a clear button, which is visible under the progress bar. When you click on that it resets the cookies values so you can start over with your users.

    Under the progress bar you will now be able to see the progress with numbers.

    Instead of starting with the oldest users, it now starts from the newest users. I did this so you do not need to import all users which may have been already synced to mailchimp if you only need to import some user that you inserted lately.

    What you need to take care of. When syncing you need to leave the page open. That's not something I changed, that's how it used to be. In some cases still your server may time out. When this happens you'll see that the progress bar (and the users counter) is still for several minutes. To make sure check the js console for admin-ajax.php 500 internal server error. When this happens you can wait some time and try sync again. The sync will continue from the place it stopped.

    Cheers!
    Panos

  • Lindeni Mahlalela

    Hello Thomas.

    How are you doing today? I hope you are having a great day so far.

    I would like to know if the issue disappeared after Panos applied a fix to your website. I would be very delighted if the issue was fixed. If the issue still persists please let us know and we will be happy to assist in resolving the issue.

    Please let us know if you need any further help with this issue.

    I hope you enjoy your day further.

    Cheers,
    Mahlamusa