Why am I getting Wix timeout errors?

I recently implemented a new back-end function to test out the new password reset API. Shortly after that, I am seeing errors in my log along the lines of: " WebMethod request timed-out after 14 seconds… Did you forget to resolve a promise? "

These are now happening no matter which function I call in the back-end. It is as if there is something pertaining to that new API that has caused by backend “container” to get fubar’d.

Here is the relevant code snippet from my http-functions.js file where I implemented that new API:

switch (request.path[0]) {
  // OTHER FUNCTIONS HERE
  case 'resetpassword': {
    response.body = {[RESULT_KEY]:false}; // Default indicate failure
    memberEmail = request.query[EMAIL_ARG];
    deviceId = request.query[DEVICEID_ARG];

    // Check the combo of email addr and device id, do we know them?
    try {
      await isAccessForDeviceAllowed(deviceId, memberEmail, response);
    } catch (error) {
      response.body = {[RESULT_KEY]:false, [ERRORMSG_KEY]: "Error establishing member data."};
      return ok(response);
    }           
    if (!response.body.result) {
       // Failed to validate user+device
       response.body = {[RESULT_KEY]: false, [ERRORMSG_KEY]:"Invalid website request detected for: " + memberEmail};
       return ok(response);
    }
    try {
      await authentication.sendSetPasswordEmail(memberEmail);
      console.log("I successfully requested a password reset.")
      response.body = {[RESULT_KEY]:true};
    } catch (error) {
      console.error(error);
      return ok(response);
    }
    return ok(response);
  }
}

This is the same pattern I’ve used in many other functions, which have all been working fine for months (with no timeout errors). The isAccessForDeviceAllowed method is a standard one in my back-end that was not touched and has been working for many, many months.

Btw, when I called this function in test, it worked correctly, the password reset email was sent to my user, etc. But shortly after that successful test (and after we published the backend update), I am now seeing all sorts of timeout errors.

How can I fix my back-end container? Is it possible to “reset” or “reboot” it?

All my mobile users which utilize this back-end are now prevented from using the site contents, which cripples the app. Help!!!

Thanks!

I’m getting the same issue as of this morning with functions that have been working normally for a few weeks. Was there an update that’s causing problems?

@nate - that’s interesting, at least I know now it wasn’t something we inadvertently did when we implemented our latest function. I have a ticket open with support, but so far no answer. In the meantime all my mobile app users are completely down!

I am also now getting errors trying to load my collections for modifications. Something definitely going on in the back-end!

Investigating further, I’m consistently (though not always) timing out on a collection query - on an empty collection.
Anyone in support able to comment on this?

That would be somewhat consistent with the fact I’m getting timeouts even trying to open a collection in dev mode to make changes.

@frysingertad and @nate can you please share the url to your site?

Mine is in the preview environment of https://dpac.rocks

Looks like things are back to normal for me, Nathan you?

Yep. Working smoothly again. Thanks all!

Great, thanks for letting us know!