Angular multiple http post requests give me error: "net::ERR_INSUFFICIENT_RESOURCES"
Angular multiple http post requests give me error: "net::ERR_INSUFFICIENT_RESOURCES"
我正在导入一个 .xlsx 文件,其中有 6000 个客户,我试图遍历客户并为每个客户发出 http post
请求,但我收到此错误:
net::ERR_INSUFFICIENT_RESOURCES.
如何插入这些客户?它们需要通过我的后端才能加密。
this.customers.forEach(customer => {
this.customerService
.createCustomer(customer)
.pipe(take(1))
.subscribe(() => {});
});
只导入了 2000 个客户。有什么办法可以解决吗?
谢谢。
顺便说一句,我不是 100% 确定,但浏览器尤其是 Chrome 无法在短时间内处理大量请求,
要解决此问题,请尝试在 2000
请求后稍作延迟,因为您提到可以处理此号码。
我正在导入一个 .xlsx 文件,其中有 6000 个客户,我试图遍历客户并为每个客户发出 http post
请求,但我收到此错误:
net::ERR_INSUFFICIENT_RESOURCES.
如何插入这些客户?它们需要通过我的后端才能加密。
this.customers.forEach(customer => {
this.customerService
.createCustomer(customer)
.pipe(take(1))
.subscribe(() => {});
});
只导入了 2000 个客户。有什么办法可以解决吗?
谢谢。
顺便说一句,我不是 100% 确定,但浏览器尤其是 Chrome 无法在短时间内处理大量请求,
要解决此问题,请尝试在 2000
请求后稍作延迟,因为您提到可以处理此号码。