-
Notifications
You must be signed in to change notification settings - Fork 20
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
cfenv function calls are competing to handle the same temporary file #40
Comments
I believe this is an issue with the As a work-around, I think we can just try/catch around the One immediate work-around for you would be to set the port number in one of the following env vars when running your app. node-cfenv/lib-src/cfenv.coffee Lines 169 to 172 in a5dbceb
|
fixes #40 This is a very simple to fix to the problem with ports where it will occaisonally throw an error: - hoodiehq-archive/node-ports#4 The fix is to catch the error and use port 3000. Not great, but should handle some cases where this was a problem. An alternate fix to try would be to try fetching the port again, probably in a loop (with some limit), in hopes of getting a value from ports.
Thanks for the bug report! I've added a simple fix to prevent the error from ports from propagating up, hopefully this is good enough for your environment. If not, open a new issue. |
Please suppose that there are multiple
cfenv
function calls in the same host at the same time - in the specific cases, for examples, Concourse CI kicks multiplecfenv
function calls in the same virtual machine.Sometimes one of the
cfenv
function calls fails with the following error.It seems that one
cfenv
function call has deleted the temporary json file while another tries to rename the same temporary json file.Please consider to fix this race condition.
The text was updated successfully, but these errors were encountered: