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

Sporadic C# compilation issue #999

Open
fabiocav opened this issue Nov 28, 2016 · 41 comments · Fixed by #1367
Open

Sporadic C# compilation issue #999

fabiocav opened this issue Nov 28, 2016 · 41 comments · Fixed by #1367
Assignees
Milestone

Comments

@fabiocav
Copy link
Member

Over the past few days, a few function apps have run into a compilation failure that seems to be caused by an attempt to queue additional Roslyn compilation events after the compilation is marked as completed, leading to an InvalidOperationException with the message: Cannot enqueue data after PromiseNotToEnqueue.

Opening this for investigation and tracking.

@paulbatum
Copy link
Member

Looks like a Roslyn issue, we are following up with them.

@paulbatum paulbatum modified the milestones: January 2017, Next - Triaged Dec 20, 2016
@paulbatum
Copy link
Member

@fabiocav any updates on this? If we don't have a date for when this is likely to be unblocked I think I should move it out of the January milestone.

@fabiocav
Copy link
Member Author

Still an ongoing discussion with the team. It's not likely to be unblocked in this milestone, but it sounds like there has been some work done to address this issue in 2.0.0 (Roslyn)

@paulbatum paulbatum modified the milestones: Next - Triaged, January 2017 Jan 19, 2017
@DamianFlynn
Copy link

DamianFlynn commented Mar 23, 2017

This is still happening, three different function apps, and different functions within each app are now presenting the same problem as covered here. Just to confirm that restarting the Web Application sorts out the issue for now

@fabiocav
Copy link
Member Author

@DamianFlynn thank you for reporting. Unfortunately, a restart is indeed the way to address this at the moment, but we understand this is not ideal. We'll be working on updating the compiler references soon, now that 2.0 has been released, both, to address issues like this and bring C# 7.0 support.

@tomasmcguinness
Copy link

This issue occurred in a Queue bound function yesterday, nearly ruining a demo we were giving to a customer. The function in question was deployed weeks ago and just suddenly stopped working. As we're using the consumption model, I didn't find an obvious way to restart them as suggested by @DamianFlynn. I just disabled and reenabled the function, which seems to have solved the issue. Do you have an ETA on when this will be resolved?

@DamianFlynn
Copy link

DamianFlynn commented Mar 30, 2017 via email

@mathewc mathewc removed this from the Next - Triaged milestone Mar 31, 2017
@mathewc
Copy link
Member

mathewc commented Mar 31, 2017

Assigning this back to triage so we can get traction on this - customers are hitting this, and we're also seeing this in our runner from time to time, generating sev 2 incidents.

@christopheranderson christopheranderson added this to the April 2017 milestone Apr 3, 2017
@gibwar
Copy link

gibwar commented Apr 3, 2017

Just ran in to this issue today as well on an HTTP triggered function. Restarting the app service brought everything back up. Also on consumption plan.

@tomasmcguinness: you can restart the service by going to the function app like normal, then function app settings, and under the "Manage" section click on "Go to App Service Settings" and from there you can stop and start it like a normal app service.

@fabiocav
Copy link
Member Author

Reopening for triage as this did not get resolved as expected

@fabiocav fabiocav reopened this May 11, 2017
@fabiocav fabiocav removed this from the April 2017 milestone May 11, 2017
@fabiocav
Copy link
Member Author

fabiocav commented Jan 9, 2018

Thank you @tangozulu32123. This is assigned to the current sprint and we hope to have additional fixes and mitigation steps for this issue soon.

@fabiocav fabiocav modified the milestones: Sprint 14, Sprint 15 Jan 10, 2018
@fabiocav
Copy link
Member Author

Updating milestone to better reflect when this will be done.

@fabiocav fabiocav modified the milestones: Sprint 15, Sprint 16 Jan 24, 2018
@paulbatum paulbatum modified the milestones: Sprint 16, Sprint 17 Feb 7, 2018
@paulbatum paulbatum modified the milestones: Sprint 17, Backlog Feb 21, 2018
@bonserem
Copy link

bonserem commented May 8, 2018

Ran into this issue twice (March and April 2018)with an Function App with a Eventbus trigger twice. Restart fixed it. Problem was it took days to find out it wasnt running...

@sisoje
Copy link

sisoje commented Jul 29, 2018

same here, restart was needed

@mathewc
Copy link
Member

mathewc commented Jul 30, 2018

I recently opened #3145 for this as well.

@snbcdev
Copy link

snbcdev commented Jul 30, 2018

Ran into this issue over the weekend, our function app stopped working on 7/28/18 at 11:51 PM Pacific Time. When I logged into Azure Portal and looked at the app's code, I saw the erorr notification with the message "Cannot enqueue data after PromiseNotToEnqueue." Restarting the app fixed it.

@mathewc
Copy link
Member

mathewc commented Jul 30, 2018

Guys - we're looking at this now and will get a fix out for this ASAP.

@Kapster17
Copy link

Same issue we have started facing with our function that's triggered by an event-hub.
The function executing is critical to our application.

Any workaround until we have a fix ?

Thanks

@paulbatum
Copy link
Member

paulbatum commented Aug 3, 2018

Until the fix is deployed globally, the best workaround is to switch to writing your function as a class library in VS or VS code (e.g. https://docs.microsoft.com/en-us/azure/azure-functions/functions-develop-vs) so that you are deploying .dll files to your function app and no compilation is required on the server side. I understand that moving from csx to cs is not 100% trivial and it might not be viable, but I would say that we are still at least a week away from having this fix be deployed globally so you might want to consider it. Sorry I dont have a better workaround to share right now.

@IvanovOleg
Copy link

IvanovOleg commented Apr 2, 2019

This issue still exists!

@gridr-ch
Copy link

Hi @paulbatum ,
Is there an update / fix to this issue?

@paulbatum
Copy link
Member

It seems that despite multiple attempts to address this issue through roslyn updates and other mitigations, this error can still occur. I don't have any updates to share at this time. The same recommendation that I made before still applies - you can completely avoid impact by deploying compiled binaries. Our dev tools in VS and VS Code make this straightforward.

@paulbatum
Copy link
Member

We are planning on taking another Roslyn update (see the issue referenced above).

@Hazhzeng
Copy link
Contributor

Another customer is raising the same issue 183252697.

@paulbatum
Copy link
Member

The Roslyn update when live in May 2020 and as far as I'm aware there have been no further reports of the issue since then, closing.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 8, 2021
@ConnorMcMahon
Copy link
Contributor

We saw another issue of this appear on the latest version of V3 on an internal support case.

@ConnorMcMahon ConnorMcMahon reopened this Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.