Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LanguageWorkers]Implement function reload #3400

Open
mhoeger opened this issue Sep 5, 2018 · 7 comments
Open

[LanguageWorkers]Implement function reload #3400

mhoeger opened this issue Sep 5, 2018 · 7 comments

Comments

@mhoeger
Copy link
Contributor

mhoeger commented Sep 5, 2018

We are too aggressive about restarting the language worker processes (for example, on re-loading user code). Can lead to confusing log messages about node exited with code -1


First reported: Azure/azure-functions-core-tools#689
Per @blueelvis:
Hi!

Host Version - 2.0.12050.0
Running I am starting the function and after starting, I get the following in the logs -

[02-09-2018 13:43:04] Generating 4 job function(s)
[02-09-2018 13:43:04] Found the following functions:
[02-09-2018 13:43:04] Host.Functions.damage-assessment-bot
[02-09-2018 13:43:04] Host.Functions.messages
[02-09-2018 13:43:04] Host.Functions.some-function
[02-09-2018 13:43:04] Host.Functions.test
[02-09-2018 13:43:04]
[02-09-2018 13:43:04] Host initialized (86ms)
[02-09-2018 13:43:04] Host started (88ms)
[02-09-2018 13:43:04] Job host started
[02-09-2018 13:43:04] Stopping JobHost
[02-09-2018 13:43:04] Job host stopped
info: Host.General[0]
      Script host restarted.
[02-09-2018 13:43:04] Language Worker Process exited.
[02-09-2018 13:43:04] node exited with code -1
 .
[02-09-2018 13:43:04] Worker 6cdf2495-5568-40ee-ac26-a973a2423e99 connecting on 127.0.0.1:22499 []
[02-09-2018 13:43:05] Path must be a string. Received undefined
[02-09-2018 13:43:09] Host lock lease acquired by instance ID '000000000000000000000000571B63F6'.

The Function starts working fine but any idea why am I getting that the job host was stopped and node exited with code -1?

@pragnagopa
Copy link
Member

Functions host and Language workers need to implement Reload action

@pragnagopa pragnagopa changed the title Don't kill out-of-proc language worker when loading new code [LanguageWorkers]Implement function reload Sep 5, 2018
@pragnagopa pragnagopa self-assigned this Sep 5, 2018
@blueelvis
Copy link

@mhoeger @pragnagopa - Not sure if this is an issue but there is one more line which looks confusing in that log - [02-09-2018 13:43:05] Path must be a string. Received undefined

@mhoeger
Copy link
Contributor Author

mhoeger commented Sep 7, 2018

@pragnagopa - without this, i also think that development is changed. meaning you can't keep the same func.exe running while changing and updating the function. i think we may want to prioritize this more?

@pragnagopa
Copy link
Member

Opened #3415 to refactor language worker process restarts

@paulbatum paulbatum added this to the Backlog milestone Sep 10, 2018
@pragnagopa
Copy link
Member

pragnagopa commented Sep 10, 2018

Implementing function reload involves updating each language worker:

@s-KaiNet
Copy link

This Language Worker Process exited. also de-attaches VSCode debugger as soon as I save the source javascript file. Please fix it, for now debugging experience is too bad.

@pougetat
Copy link

Hey @pragnagopa ,
I'm trying to find issues to start working on and help out :).
Would it be a good idea for me to look into implementing function reload for one of the language workers ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants