Support Topics Documentation Slack YouTube Blog

Big time execution variance in an API service

App ID 4A47197B-AE30-FA84-FF56-0071F4010900
Service homeworkAdd*

I have a rather simple API service that takes an incoming array of 10 strings, then:

  1. Saves it to a DB table
  2. Loads & updates 3 other table objects

Usually, it is completed in <10 seconds but once per 100 executions, it times out unexpectedly.
Furthermore, if you look at the logs, it is the first step that gets delays, which is a simple save to a DB table.

See below that this first step takes 20 seconds.

2021-05-29 19:02:56,925 | SERVER_CODE |  INFO | [27351] [70B0A5A4-7DEA-AA69-FFB5-DD4BEA06C800] [INVOKE SERVICE] services.closeImport.homeworkAdd
2021-05-29 19:03:16,648 | SERVER_CODE |  INFO | [27351] homeworkAdd: saved report
2021-05-29 19:03:16,650 | SERVER_CODE |  INFO | [27351] {
  data: null,
  created: 1622314996000,
  contactParent: false,
  slots_slug: null,
  ownerId: null,
  message: null,
  report: 'Shah did well, but had a little difficulty subtracting minutes from time. We worked on some time problems in class. I also assigned some more for homework. Thank you. ',
  file2: null,
  ___class: 'reports',
  file3: null,
  sessionQuality: null,
  file1: '<a href=https://storage.googleapis.com/media.landbot.io/28643/customers/106685286/V44RZIDCB8K9HQ3JWY0E4Q3WH8YTPGJK.docx>&#x1F4CE; &nbsp;  Attachment 1</a>',
  bgFeedback: 'none/ntr',
  updated: null,
  objectId: '610B9822-DCA7-4381-983C-C333B1021D02',
  calendarObjectId: null
}
2021-05-29 19:03:16,733 | SERVER_CODE |  INFO | [27351] homeworkAdd: saved slot
2021-05-29 19:03:16,811 | SERVER_CODE |  INFO | [27351] homeworkAdd: loaded calendar events
2021-05-29 19:03:16,811 | SERVER_CODE |  INFO | [27351] {
  subjectsObjectId: '90C190C1-F2CC-47DF-AF53-22B40B424F63',
  ___class: 'calendar',
  tutor_name: 'Sam Mansourou',
  objectId: 'F8F30B0D-5AA5-4CEF-B40C-481351331518'
}
2021-05-29 19:03:16,888 | SERVER_CODE |  INFO | [27351] homeworkAdd: loaded tutor
2021-05-29 19:03:16,889 | SERVER_CODE |  INFO | [27351] {
  UTC_offSet: null,
  timezone: 'US/Eastern',
  created: 1618357510000,
  emailacct: null,
  subjects: 'English,History,Math,MathEnglishCombo',
  opp_status: 'enrolled',
  grades: 'Grade 1,Grade 2,Grade 3,Grade 4,Kindergarten',
  ownerId: null,
  zoomid: '4889311496',
  email2: null,
  score: '6.4',
  bgEmail: 'us@brilliantgrades.com',
  tutor_name: 'Sam Mansourou',
  phone: '+17542549457',
  tip_level: '21',
  bgPhone: '+19175632694',
  maxslots: '8',
  ___class: 'tutors',
  updated: 1622274656000,
  objectId: 'E418FF33-D9FD-4A64-A385-BF46C28991E4',
  lead_id: 'lead_pjqox08T0cEFMhbxK7ieDv3BeFfJAMUURPjFOsHhstg',
  email: 'smansourou1@yahoo.com'
}
2021-05-29 19:03:26,926 | SERVER_CODE | ERROR | [27351] Task execution is aborted due to timeout

Here’s a usual case where it does not time out:

2021-05-29 00:13:58,986 | SERVER_CODE |  INFO | [2105] [F0336A80-E810-1560-FFA1-80D5619FCC00] [INVOKE SERVICE] services.closeImport.homeworkAdd
2021-05-29 00:13:59,501 | SERVER_CODE |  INFO | [2105] homeworkAdd: saved report
2021-05-29 00:13:59,503 | SERVER_CODE |  INFO | [2105] {
  data: null,
  created: 1622247239000,
  contactParent: false,
  slots_slug: null,
  ownerId: null,
  message: null,
  report: 'Hello! Grant and I had a great session.  He read a short informational story about bees. He correctly answered 2 out of 2 comprehension questions and 1 out of 1 word meaning question! Way to go, Grant! Next, I asked Grant to help me make a chart about grammar rules. Grant did amazing and listed 5 important rules! He even included when to add -es to the end of words. We worked on a second grade grammar paper, and Grant answered all of it correctly! Super work, Grant! Near the end of our session, we played a multiplication game. Grant had to choose a factor from the first column, a factor from another column, and multiply them. Then Grant had to see if the product was in the last column. Grant did very well and won the game! For homework, I am including a grammar page and the multiplication game. Below is a link to a multiplication game I think will help Grant with memorizing more of the facts. Next week, we will write a story about the Minecraft toys and practice reading comprehension strategies.  https://www.mathplayground.com/math_monster_multiplication.html',
  file2: null,
  ___class: 'reports',
  file3: null,
  sessionQuality: null,
  file1: '<a href=https://storage.googleapis.com/media.landbot.io/28643/customers/106576620/2HRRHJOXWAZYWS4OY58YA8ZQIXM0MXPY.pdf>&#x1F4CE; &nbsp;  Attachment 1</a>',
  bgFeedback: 'none/ntr',
  updated: null,
  objectId: 'B0F251A5-C6AC-4293-AEF1-697846263480',
  calendarObjectId: null
}
2021-05-29 00:14:00,310 | SERVER_CODE |  INFO | [2105] homeworkAdd: saved slot

Hello @Andreas_Marinopoulos

An internal ticket BKNDLSS-25336 for your problem has been created. We will let you know the result.

Regards,
Inna

1 Like

Hi Andreas,

We made a few optimizations in our system. Could you please check if you still experience timeouts?

Regards,
Mark

1 Like

Ok will set it live again and let you know over the next couple of days. Thanks Mark.

Works fine now, thanks