如何增加流程的时间 [英] How Do I Increase Time For A Process

查看:80
本文介绍了如何增加流程的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常简单的代码,用于向用户发送电子邮件。

它收集用户的一系列电子邮件地址,并向每个电子邮件ID发送电子邮件。

It当从数据库中选择的电子邮件ID少于250时,工作正常。

如果在任何过程中,要发送的电子邮件数量很高,我会收到操作超时的错误。

我可以做些什么来增加处理时间?

感谢您的帮助。

解决方案

我在猜您正在生成并从网页发送批量电子邮件。



我建议您的网页应该将电子邮件请求插入到数据库表(队列)中,并且您应该有一个后端进程(计划任务或读取数据库队列并发送电子邮件消息。


尝试将要同时发送的电子邮件数量分开(尝试在多个线程中执行此操作)。

I have a very simple code for sending email to users.
It colleccts an array of emai addresses of users and sends an email to each email id.
It works fine when there are less than 250 email ids selected from database.
If in any process, the number of emails to be sent is high, i get the error that operation is timed out.
What can i do to increase to time of processing?
Thanks for your help.

解决方案

I am guessing that you are generating and sending bulk email from a web page.

I suggest that your web page should insert the email requests into a database table (the queue) and that you should have a back end process (a scheduled task or a service) that reads the database queue and sends the email messages.


Try to divide the amount of emails to send at the same time (try to do so in more than one thread).


这篇关于如何增加流程的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆