Timing Out: Azure Job Scheduler Unable to Complete Task

After setting up a mobile job with the Azure scheduler service some time ago to run a stored procedure on my Azure SQL database periodically, I encountered issues when it was migrated to the new Azure Portal in April and stopped running successfully.

The stored procedure usually takes about 90 seconds to run, but it seems like the job times out before completing now. I suspect that something related to the connection string may have been fixed previously before the migration.

Below is the complete script being executed:

function runTasks() {    
   var sql = "exec [dbo].[runTasks]"; 
      console.log("Executing runTasks...");
      mssql.query(sql,{
         success: function(results){
         console.log("Finished the runTasks job.");
         },
          error: function(err) {
            console.log("error is: " + err);
         }
     });
 }

Is there a way to increase the timeout for this call?

(I am unsure where the connection string used for this code is located after the migration to the new portal.)

Answer №1

For further details about Scheduler Jobs post-migration, you can visit https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-migrating-from-mobile-services/#_on-demand-jobs.

We suggest converting all on-demand jobs to either WebJobs or Functions. Create new scheduler jobs as WebJobs or Functions.

Furthermore, Mobile Apps may be unloaded if they remain idle for a certain period of time even while webjob scripts are running.

By default, apps will be unloaded in order to conserve resources. To keep the app loaded continuously, especially for long-running tasks, consider enabling Always On in Basic or Standard mode. You can adjust this setting in the management portal - refer to Configure web apps in Azure App Service for more information.

Answer №2

To overcome the timeout problem with the SQL job, I decided to take a different approach. I chose to install SQL Server Management Studio on an available Azure virtual machine and configured the task as a scheduled SQL Agent job. This change successfully resolved the issue.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The navigation buttons on the Bootstrap carousel will only respond to keyboard commands after the arrow on the

Is there a way to change the default behavior of the bootstrap carousel to allow keyboard navigation without having to click the arrows on the screen first? In my modal, I have a carousel that I want users to be able to navigate using the keyboard arrows ...

Uploading an image using ajax with multer

When using Multer to upload an image file to my Node server, I keep getting 'undefined' when trying to use ajax to send the image. Ajax : image = $("#input-file-img").val() const data = new FormData(); data.appe ...

Create a sequence of reactions using Selenium WebDriver

I am looking to gather a set of responses while browsing a website, and then "recreate" the process using those responses. Upon exploring an different discussion, I stumbled upon this method for rendering HTML: content = requests.get("https://stackoverfl ...

Enhancing the Google canvas script to incorporate numerous markers

Currently, I am using a template that includes a Google map with coordinates set in JavaScript. The code for the marker on the map is as follows: //Google Map var latlng = new google.maps.LatLng(44.761128,21.227395); var settings = { ...

Using Flask to Render Templates with Repeated HTML Components

I am currently working on integrating a Flask app with JS. My app.py file has the following code: import urllib import requests import time from es import book from flask import Flask, render_template, request, jsonify app = Flask(__name__) @app.route( ...

PHP query creates a multidimensional array used to generate a Sankey diagram

I am looking to create a multidimensional array for d3.sankey visualization. However, I am struggling to understand how to construct a multidimensional array. What I require is as follows: d3.Sankey requires an input like: { "nodes":[ {"node":0,"name": ...

I am facing an issue in Angular2 where my component is unable to bind to the model and show the data in the HTML

This is the module I am working with: import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BrowserModule } from ...

Data object constructor is not triggered during JSON parsing

Currently, I am retrieving data from a server and then parsing it into TypeScript classes. To incorporate inheritance in my classes, each class must be capable of reporting its type. Let me explain the process: Starting with the base class import { PageE ...

The function e.preventDefault() appears to be ineffective when applied to both the submit button and anchor tag within an

In my ASP.Net Core MVC App View <form> <div class="container"> <div class="row"> <div class="col-md-offset-2 col-md-4"> <div class="form-group"> <input type="text" class="form-contr ...

How can I retrieve the element to which the jQuery plugin was attached?

After working on my first jQuery plugin, I encountered some issues with adding CSS in the head. Inline CSS was causing bugs in IE8 - 10 when injected by the script, so I need to use a styles tag instead. The challenge is targeting the actual element that ...

I keep encountering the error message "SyntaxError: Cannot use import statement outside a module" even after including "type": "module" in the package.json file. How frustrating to still be faced with yet another error

Upon running the code snippet provided, an error message is displayed stating "SyntaxError: Cannot use import statement outside a module." Despite successfully installing node-fetch using npm install node-fetch What could be causing this issue? import fet ...

React: Actions should only be simple objects

My project structure is set up as follows: https://i.sstatic.net/f1wdV.png In GlobalStore.js, I have the following code: import React from 'react' const GlobalContext=React.createContext(); const GlobalProvider=GlobalContext.Provider; const Gl ...

Populating an array with references based on the input provided by the user

Is there a way to extract the reference immediately following a matched word, including the matched word itself, using regex? For example: var refArray = []; var str = "matt 25:5 hello foo bar matt 5:10"; // unknown information var pattern = "matt"; // l ...

Importing template Vue files into Router in Vue.js

Hello everyone, I have a Vue.js project that I am working on and I am looking to import a vue template file into my index.html without using webpack or browserify. It seems like I will need to use a router to accomplish this and include some additional Ja ...

Tips for effectively logging data retrieved through Ajax requests

When I have content loaded via Ajax with two divs and a list, my goal is to console.log which div I was typing on when clicking on a list item. However, the issue I'm facing is that I always get the first one I clicked until I refresh the page. Altho ...

Start the Angular $scope when the page first loads

When initializing a user session with specific data, I face the challenge of making sure that the session data is populated before it is required by certain directives in my application. Currently, I check if the local session data is empty on loading the ...

jQuery performs perfectly in Chrome but encounters issues in IE9/IE8 and other older versions of Internet

I've implemented this lengthy jQuery script to enable dynamic dropdown loading and updating when selections are changed. However, I'm facing issues in Internet Explorer where the script loads the dropdowns initially but doesn't trigger oncha ...

The map component in React is currently displaying all images for every project, rather than just the images for the designated project

Currently, I am developing a portfolio website using React. I am facing an issue where upon clicking 'view more' on a project card, instead of displaying specific images for that project, all the images are being shown in the pop-up. How can I re ...

Encountering issue with Mailchimp post request in React app

As I am developing my web application using React without a backend, I encountered an issue while trying to integrate MailChimp. The error message that I received is as follows: ContactUs.jsx:40 POST http://localhost:3000/3.0/lists/{api-key} 404 (Not F ...

Performance rating - Displaying the overall rating

http://jsfiddle.net/q8P7Y/ I am currently facing an issue with displaying the final score at the end of a project. There are multiple approaches I can take to solve this problem, but I am unsure of the best way to proceed. In my current setup, the next b ...