Service invocation failed by timeout

The hosted API Service is working only in Debug, when I deploy, keeps getting “Service invocation failed by timeout”"3B743F80-EB86-F8B3-FF3F-051822A76E00"

AppId = 8475C161-FC49-E358-FFB5-930D4295C700

Your code looks good.
It could be possible that it just takes longer than allowed (5 seconds by default)

Please go trough the Troubleshooting Guide and analyze your code execution time

Hello Anderson

Could you please provide the code of your service you’re trying to invoke so we could figure out where the problem is.

Regards Anton

‘use strict’;

class InvitationService {


  • @param {String} personId
  • @returns {Promise.<Array.<Coupon>>}
    getCoupons(personId) {
var invitationQuery = new Backendless.DataQuery(); = ['EntityId'];
invitationQuery.condition = "PersonId = '" + personId + "' AND Type = 'Coupon'";
invitationQuery.options = {
  pageSize: 20,
  offset: 0,
  sortBy: 'created asc'

return Backendless.Persistence.of("Invitation").find(invitationQuery)

    var ids = [];
    for(var i = 0; i <; i++){


    var whereCondition = JSON.stringify(ids)
      .replace(new RegExp('"', 'g'),"'");

    var couponQuery = new Backendless.DataQuery();
    couponQuery.condition = "objectId IN " + whereCondition;
    couponQuery.options = {
      pageSize: 20,
      offset: 0,
      sortBy: 'created asc',
      relationsDepth: 1,
    return Backendless.Persistence.of("Coupon").find(couponQuery)





Ok Thanks. I put some console.log() in my code. But the logger never register. Any tips? I am missing any configuration?

Our developers are investigating this issue (BKNDLSS-13465 Logging in BL doesn’t work)

Thanks Vitaly