I have tested the custom business logic with Mailgun hostname in production mode and is still not working. I am still receiving a fault when I call to the custom business logic in production mode.
In debug mode I am able to send emails.
I have now approved and added the hostname = api.mailgun.net
When I am in production mode I receive a fault with Code 15000 with description:
“Custom business logic execution has been terminated because it did not complete in permitted time - 5 seconds”
Then I switch to debug mode, and I am able to send an email.
It´s a weird issue.
When I am in Intellij IDE I switch between modes running “npm run debug” or “npm run deploy” in its terminal console.
When I code “npm run debug”, the server is waiting for the request and the email is sent.
When I code “npm run deploy”, I can see this:
> coderunner deploy
11:30:10.254 - CodeRunner(tm) Backendless Debugging Utility v1.5.5
11:30:10.257 - Copyright(C) 2016 Backendless Corp. All rights reserved.
11:30:10.486 - Building Model..
11:30:10.487 - Model Build completed
11:30:10.488 - Event handlers (1):
11:30:10.488 - custom.sendMail (app/handlers/custom-events/sendMail.js)
11:30:10.489 - Preparing app zip file for deployment..
11:30:10.493 - 4 files added into deployment archive
11:30:10.501 - Registering Code Runner on https://api.backendless.com
11:30:11.363 - Runner successfully registered.
11:30:11.363 - Registering Model on https://api.backendless.com
11:30:11.905 - Model successfully registered
11:30:11.905 - Publishing Model to server
11:30:13.499 - Successfully published
So, I confirm that the code is in production mode, but in this case I receive the fault.
I am currently having this exact same problem (also using mailgun). I have the external host setup correctly and I am getting timeouts in production (works correctly in debug mode). I get error “Service invocation failed by timeout”.