• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sending large numbers of emails and not getting crashed?

 
Ranch Hand
Posts: 598
3
jQuery Google App Engine Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Language : C#
Database : Sqlserver.

I have created a simple migration tool for migrating from one mailbox to another. I have created a database for storing the email data. My code can smoothly send small numbers of emails without a problem..The application hangs whenever I try to send large numbers of emails. What method can I use to prevent this ? I have no idea whatsoever. I am having big performance impact in my application. I know my internet is slow and machine is not powerful enough as well. I have to feed the server baby slowly so it won't choked up. I can think of two solutions, however I have not tried them yet.
1. Sending emails in batches.
2. Using threads to let the application breathe for sometime.

I need your expert advice.

I can think my problem is language independent and Java programmers can also help me in this regard.

best regards,


 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bobby,
When we send out the weekly emails on this site, we do so in batches.

As far as why it hangs, one possibility is that you are using too much memory.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another possibility is that the server you are using to send the e-mails objects to you is not happy about being used for bulk mailing and is throttling your application. That means it would be delaying each transmission.

That's just another guess. You might consider doing some debugging to see where the slowdown is taking place.
 
Bobby Sharma
Ranch Hand
Posts: 598
3
jQuery Google App Engine Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Jeanne : The Api I am using to send emails have an option of Batch Request , it might come in handy. thanks for the suggestion.

@Paul: Ok Paul. I am using a single thread for sending/receiving emails and for UI, this could be a possible problem. Now , I have some ideas to solve the problem after reading this thread. I will update this thread with a reply as soon as I have an ultimate solution.

thanks.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic