C# CreateOrganizationAsync Timeout Code 504

  • Used Zammad version: 1.2.30
  • Used Zammad installation source: Zammad.Client via NuGet

Hi, I am creating 2 Organizations per second, so I send two Tasks every seconds via
PostAsync("/api/v1/organizations", organization).

The Problem is, the Hosting System has Problems with it after two or three minutes. I have thousands of Datasets so I have to create many and don´t know why my System does not even support to create 2 in one second. Is that normal? Is that a Problem of the System?

Thank you for helping! Miguel

Please provide your script, it’s quite hard to help with shooting in the dark. :x

Okay sorry, this is the interesting part. :slight_smile:

foreach (DataRow dr in CSVResult.Rows)
{
System.Threading.Thread.Sleep(2000);
TestAsyncProc(orgClient, dr);
}
Console.WriteLine(“Loop ends.”);

private void TestAsyncProc(OrganizationClient orgClient, DataRow dr)
{
var org = orgClient.CreateOrganizationAsync(
new Organization
{
Name = dr[0].ToString(),
Shared = true,
Domain = “”,
DomainAssignment = false,
Active = true,
Note = “”,
Kundennummer = null,
Plz = dr[1].ToString(),
Ort = dr[2].ToString(),
Land = dr[3].ToString(),
Geschaeftsbeziehung = dr[4].ToString(),
Betreuenderpartner = dr[5].ToString(),
Crmlink = dr[6].ToString(),
Crmid = dr[7].ToString(),
MemberIds = null
});
Console.WriteLine(dr[0].ToString());
}

It creates only About 100 and then has a timeout

That’s the complete script doing the magic?
I’m missing the “contact Zammad part” (and instance name) :x

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.