Mailchimp not creating Communications for all recipients

Hello,

Background: We are using Sage CRM 7.3b On-Premise. We had experimented with Mailchimp for E-marketing integration, then tried Swiftpage, but ultimately went back to Mailchimp.

We did our first 4 campaigns this week. The results of the campaigns (clicks, bounces, opens, etc.) are showing correctly in the MyCRM -> Mailchimp Campaigns tab. However, despite a few thousand e-mails going out, I only see only 60 communication records from 2 of the 4 campaigns got created in CRM. There should be a thousand or so for each of the 4 campaigns. I was able to find the 60 by querying the communication table.

I have a lot of SQL deadlock errors in my mailchimp log file located in C:\Program Files (x86)\Sage\CRM\CRM\Logs. I tried stopping and starting IIS & SQL Server, but that didn't help. Below is a sampling of the log file.

Any ideas?

Respectfully,
Cheryl Johnson

ERROR [taskExecutorNotChecked-1]: 17-Feb-2016 06:22:30.840 There was an error processing results for campaign with id of '507fbb5a75'.
org.hibernate.exception.LockAcquisitionException: Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:139)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
at com.sun.proxy.$Proxy71.executeQuery(Unknown Source)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1962)
at org.hibernate.loader.Loader.doQuery(Loader.java:829)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
at org.hibernate.loader.Loader.doList(Loader.java:2447)
at org.hibernate.loader.Loader.doList(Loader.java:2433)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2263)
at org.hibernate.loader.Loader.list(Loader.java:2258)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:122)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1535)
at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)
at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:396)
at com.sage.crm.core.dao.BaseHibernateDao.getEntity(BaseHibernateDao.java:120)
at com.sage.crm.mailchimp.dao.CampaignsDao.getCampaign(CampaignsDao.java:227)
at com.sage.crm.mailchimp.dao.CampaignsDao$$FastClassByCGLIB$$ef7b7f0e.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at com.sage.crm.mailchimp.dao.CampaignsDao$$EnhancerByCGLIB$$fd374d53.getCampaign(<generated>)
at com.sage.crm.mailchimp.services.MailchimpResultsService.processCampaignResults(MailchimpResultsService.java:161)
at com.sage.crm.mailchimp.services.MailchimpResultsService$$FastClassByCGLIB$$4d728322.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at com.sage.crm.mailchimp.services.MailchimpResultsService$$EnhancerByCGLIB$$8663d62f.processCampaignResults(<generated>)
at com.sage.crm.mailchimp.async.tasks.MailChimpProcessResultsTask.execute(MailChimpProcessResultsTask.java:63)
at com.sage.crm.core.async.TaskProcessor.process(TaskProcessor.java:82)
at sun.reflect.GeneratedMethodAccessor420.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:69)
at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:84)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:57)
at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:102)
at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:126)
at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:225)
at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:125)
at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:73)
at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:64)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:97)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73)
at org.springframework.integration.endpoint.PollingConsumer.doPoll(PollingConsumer.java:70)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:144)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:207)
at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
at net.sourceforge.jtds.jdbc.TdsCore.isDataInResultSet(TdsCore.java:792)
at net.sourceforge.jtds.jdbc.JtdsResultSet.<init>(JtdsResultSet.java:146)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:424)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:693)
at net.sf.log4jdbc.PreparedStatementSpy.executeQuery(PreparedStatementSpy.java:733)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
... 57 more

  • 0

    Update: The 3rd and 4th campaigns that initially created no communications did finally create 62 communications between the 2. I hadn't waited long enough to see them. So for 4 total campaigns with several thousand emails going out, I have only gotten a total of 122 communications created.

    I am also continuing to see deadlock errors in the mailchimp log files.

    Any suggestions are appreciated.

    Respectfully,

    Cheryl Johnson

  • 0

    Try This:

    1. If there are any triggers deployed on tables, try disabling them.

    2. Are you getting this issue on fresh install, integrated with mailchimp?

    3. Check all the records having correct Email Id's, where you are performing mail campaign.

    4. If it don't helps, log a case to Sage CRM support.

    ATB

  • 0

    Don't have any experience with this personally, but, you mentioning you used swiftpage then went back to mail chimp rang a bell. Did you run the 'disable swiftpage' component?

    community.sagecrm.com/.../switching-from-swiftpage-to-mailchimp.aspx

  • 0

    Thanks.

    1) There are no triggers

    2) This is a fresh install of 7.3b. Note however that we tested the Mailchimp integration, turned it off and tried the Swiftpage integration, then turned that off and went back to Mailchimp.

    3) Can you explain what you mean by "Check all the records having correct Emails Id's, where you are performing mail campaign"???

    Thank you,

    Cheryl Johnson

  • 0

    I had disabled the Swiftpage functionality; but since it was suggested here, I did it again yesterday. I also generated a new API key and new list in Mailchimp before setting up the Mailchimp integration again. I then created a test campaign and sent a test email to 27 recipients. According to Mailchimp, all 27 emails were sent and I can verify that is true. However, I only have 25 communication records created in Sage CRM.

    Does anyone have any other ideas? Sharad, I still don't know what you mean by "Check all the records having correct Email Id's, where you are performing mail campaign." If you could clarify perhaps that would help.

    Any input is appreciated.

    Thank you,

    Cheryl Johnson

  • 0

    Hi Cheryl,

    What I mean is, does all contacts has email address in the group on which you are doing email campaign?

    ATB !

  • 0

    Yes, all the campaign recipients have email addresses. In the test case that I just ran, I used 27 people with absolutely valid email addresses (I used people at my own company). All 27 emails went out and were received, but only 25 got communications. In the previous (non-test) case I sent out over 4000 emails and only 122 communications were logged.

    Any other ideas are appreciated.

    Thanks,

    Cheryl Johnson

  • 0

    could you turn logging within CRM to all queries over threshold , and maximum logging. You might want to see what is happening within those logs.