2.1 queued email problem

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hello, i've upgraded a nop site from 1.9 to 2.1.
Now i have a delay problem during checkout process. In the last step, when a user click on the 'confirm button', regardless the payment method, the system seems to hung up for 50-60 seconds.
Then the process continues without other problems.
The code line where the system stops waiting for near a minute is the following:

regardless

        private int SendNotification(MessageTemplate messageTemplate,
            EmailAccount emailAccount, int languageId, IEnumerable<Token> tokens,
            string toEmailAddress, string toName)
        {
......
            _queuedEmailService.InsertQueuedEmail(email);
......
        }

i think it's a mailing or queue problem, however smtp has been configured correctly and i can send an email with the test function.
Thank you for any suggestion
Fabrizio
12 years ago
How many orders do you have?
12 years ago
In that e-commerce we have 649 orders.
12 years ago
Fabrizio,

Are you that that issue is in _queuedEmailService.InsertQueuedEmail(email) method? Have a look at the following topic https://www.nopcommerce.com/boards/t/11126/bug-version-20-command-confirm-takes-several-minutes-using-big-databases.aspx. v2.10 has an issue with placing a new order when you have a lot of other orders. It's already fixed and the patch will be available in the next release.
12 years ago
I tried the fix, to compile it i had to remove the following property which is not present in the upgraded db (1.9>2.0>2.1)

          /// <summary>
          /// Gets or sets the value indicating whether reward points were earned for this order
          /// </summary>
          public virtual bool RewardPointsWereAdded { get; set; }


But the problem persists, in the same place (confirm button).
I tried to debug the code but after the instruction of the hung,  there's an 'eval status' which i don't understand.
During this delay time the processor go up a lot under w3wp.exe process (sql remains regular)
I suspect it's not a sql problem but a look-up problem. In the doubt i configured correctly all the three email accounts (we use only the first).
During the debug it seems that nop tries to send more than one mail, the first mailsend takes a lot and then the other goes fast.
I cannot say more i'm sorry,
happy to answer to all your questions for find the problem
thx
12 years ago
Another information, the problem is not in the machine configuration because we have three istances of the same Nop (2 for developing + 1 for production) over three different pc but unfortunately the problem is common.
thanks again
12 years ago
I found the problem: in the table QueuedEmail there were 13000 records. I deleted them and now the delay is under 2 seconds. Perfect! ... for a while
TY for the support, have a good day
12 years ago
Hi Andrei,

I'm a Fabrizio work mate. As Fabrizio sayd, we found the problem in the large number of record in QueuedEmail table.

Is it a problem if we delete all the record in this table relative to already sent email oldest than a week or more?

Thanks for your support, Domenico.
12 years ago
Sure, you can delete all already sent emails
10 years ago
It would be nice to have a Delete Queued Email in Admin > System > Maintenance, similar to the other deletes  :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.