-
Notifications
You must be signed in to change notification settings - Fork 100
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
How to recover from NoResponseFromController #60
Comments
You are pointing to something I should have looked to from a while :) If you look into the core/Read.py file, you will see that each iocb error raise an error. This is proabable not a good choice here.... Depending on the error, it could probably best to return a None.... so the system could continue and as you say, recover from a "no response from controller". We should not have to handle those errors outside of BAC0. I'm thinking maybe a simple log.error would be nice enough just to tell the user it didn't work... and continued... That said, the error handling is done by bacpypes itself and system will not try more than once. I will try something in the "bokeh" branch as I'm working on it these days. Maybe you can have a look and give me feedback |
Hi, not sure if this would work for you but I have some troubles with connecting to and reading from controllers. Sometimes it works and sometimes it does not.
In this way your code is not broken but will continue to run. Cheers, Henk |
I'm actually working on some FieldServers that trigger a Segmentation Not supported error that leads to this error. I think it's probably the most common source for this trouble. BAC0 want to get the objects list but the controller is unable to support segmentation and the list is huge... I've modified the Read.py file so when making a simple read property (which should be done when asking for the object list) if there is a segmentation not supported exception, I'll make another request that will read each property one by one. Pretty long process (it is faster to pass a custom object_list) like @henkwitte did.... but sometimes, you don't know it yet. You can test that here : https://github.com/ChristianTremblay/BAC0/tree/bokeh That said, hope you'll forgive me to put everything in this branch which is the next version of BAC0... I'm not enough confident with my git skills to re-merge this patch after... |
You are doing some awesome work here!
Henk
…Sent from my iPhone
On 11 Dec 2017, at 20:12, Christian Tremblay <notifications@github.com<mailto:notifications@github.com>> wrote:
I'm actually working on some FieldServers that trigger a Segmentation Not supported error that leads to this error. I think it's probably the most common source for this trouble.
BAC0 want to get the objects list but the controller is unable to support segmentation and the list is huge...
I've modified the Read.py file so when making a simple read property (which should be done when asking for the object list) if there is a segmentation not supported exception, I'll make another request that will read each property one by one.
Pretty long process (it is faster to pass a custom object_list) like @henkwitte<https://github.com/henkwitte> did.... but sometimes, you don't know it yet.
You can test that here : https://github.com/ChristianTremblay/BAC0/tree/bokeh
That said, hope you'll forgive me to put everything in this branch which is the next version of BAC0... I'm not enough confident with my git skills to re-merge this patch after...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#60 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Ab9PeikF7PE6-xfrNSy2R7fY1RP6QGtHks5s_X6-gaJpZM4Q7dE0>.
|
Thanks I will give the bokeh branch a try probably this week. |
New version is better at handling connectivity errors. I’ll close and see what happen. |
For the conversation: with pull-request #181 which insures that an Except of type "NoResponseFromController" is raised to user, we now simply trap it and do nothing, waiting for things to just start working again. This was sufficient for our needs (power/network issues recovery). Code sample:
|
I get a NoResponseFromController exception from Read.py while doing a simple:
It's pretty obvious what the problem is but since it happens in an internal BAC0 thread, I'd like to make sure how to properly recover from it.
Should I just:
Also on top of your head could you tell what kind of error handling is done internally on this to get a feel of how bad the exception is. Does it retry like a hundred times before throwing the exception?
The text was updated successfully, but these errors were encountered: