You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to simply load the requests module (version 2.67) takes too long for an azure function. It can take anywhere between 30 - 45 seconds to return. Running a second time without a code change occurs as it should. After a code change, it takes a long while to load, but not as long as the first time, maybe 3 - 4 seconds.
Repro steps
Step A - Create a new Webhook Javascript function
Step B - set up package.json and npm install
Step C - use the following code for index.js:
module.exports=function(context,data){// context.log('now with code change.'); // comment this out for runs 3, 4// context.log('now with another code change.'); // comment this out for runs 5, 6// context.log("about to require('request')"); // comment this out for runs 7, 8varrequest=require('request');context.log("finished require('request')");context.done();}
Step D - run the code eight times (or more). After the first two runs, uncomment the first context.log() to make a code change.. Run it again two times. Uncomment the next context.log() to make another code change. Run it again. And repeat.
Expected behavior
The difference between the two entries for about to require/finished require should be in the millisecond range.
2017-03-22T17:12:45.472 about to require('request')
2017-03-22T17:13:45.472 finished require('request')
Actual behavior
They are not. Here is the output log from my runs:
2017-03-22T17:10:28 Welcome, you are now connected to log-streaming service.
2017-03-22T17:11:28 No new trace in the past 1 min(s).
2017-03-22T17:12:28 No new trace in the past 2 min(s).
2017-03-22T17:12:45.316 Function started (Id=5dc8d244-fde0-4d00-a95a-468aa3ad243a)
2017-03-22T17:12:45.472 about to require('request')
2017-03-22T17:13:22.744 finished require('request')
2017-03-22T17:13:22.744 Function completed (Success, Id=5dc8d244-fde0-4d00-a95a-468aa3ad243a)
2017-03-22T17:13:32.685 Function started (Id=457bfbea-a505-4f88-8655-0b4ebd9cfa65)
2017-03-22T17:13:32.685 about to require('request')
2017-03-22T17:13:32.685 finished require('request')
2017-03-22T17:13:32.685 Function completed (Success, Id=457bfbea-a505-4f88-8655-0b4ebd9cfa65)
2017-03-22T17:13:56.760 Script for function 'RequestBugJS1' changed. Reloading.
2017-03-22T17:14:00.570 Function started (Id=03d91a95-9607-443d-b8b0-9eeb9caf04f2)
2017-03-22T17:14:00.601 now with code change.
2017-03-22T17:14:00.601 about to require('request')
2017-03-22T17:14:04.273 finished require('request')
2017-03-22T17:14:04.273 Function completed (Success, Id=03d91a95-9607-443d-b8b0-9eeb9caf04f2)
2017-03-22T17:14:09.894 Function started (Id=d034dd6e-ffd3-4b83-83c6-3baa95e02897)
2017-03-22T17:14:09.894 now with code change.
2017-03-22T17:14:09.894 about to require('request')
2017-03-22T17:14:09.894 finished require('request')
2017-03-22T17:14:09.894 Function completed (Success, Id=d034dd6e-ffd3-4b83-83c6-3baa95e02897)
2017-03-22T17:14:30.797 Script for function 'RequestBugJS1' changed. Reloading.
2017-03-22T17:14:34.918 Function started (Id=197356c2-f67d-4765-b0e0-63057ab0cb40)
2017-03-22T17:14:34.934 now with code change.
2017-03-22T17:14:34.934 now with another code change.
2017-03-22T17:14:34.934 about to require('request')
2017-03-22T17:14:37.356 finished require('request')
2017-03-22T17:14:37.356 Function completed (Success, Id=197356c2-f67d-4765-b0e0-63057ab0cb40)
2017-03-22T17:14:42.741 Function started (Id=a1ad15bf-2647-4e22-9d37-d2d7aa316ee1)
2017-03-22T17:14:42.741 now with code change.
2017-03-22T17:14:42.741 now with another code change.
2017-03-22T17:14:42.741 about to require('request')
2017-03-22T17:14:42.741 finished require('request')
2017-03-22T17:14:42.741 Function completed (Success, Id=a1ad15bf-2647-4e22-9d37-d2d7aa316ee1)
Known workarounds
None
Related information
Provide any related information
Programming language used: Javascript
The text was updated successfully, but these errors were encountered:
Trying to simply load the requests module (version 2.67) takes too long for an azure function. It can take anywhere between 30 - 45 seconds to return. Running a second time without a code change occurs as it should. After a code change, it takes a long while to load, but not as long as the first time, maybe 3 - 4 seconds.
Repro steps
Expected behavior
The difference between the two entries for about to require/finished require should be in the millisecond range.
Actual behavior
They are not. Here is the output log from my runs:
Known workarounds
None
Related information
Provide any related information
The text was updated successfully, but these errors were encountered: