472,982 Members | 2,333 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,982 software developers and data experts.

[Pyro] ConnectionClosedError

Didn't have much luck with this in the Pyro mailing list so I am
trying here, just in case. I have a Pyro server running as a daemon
process and occasionally (typically after several hours or days of
uptime) a ConnectionClosedError is raised when a client calls a remote
method. Both client and server run on the same machine, so I don't
think it's an actual network connectivity issue. The problem is that
once this happens, it is persistent; retrying to call a few times does
not work although the server process is still alive. The current
"solution" is to manually kill the server and restart it but obviously
this is not ideal. Is there a way to either prevent or at least
recover automatically the server when it hangs ?

George

Oct 12 '07 #1
1 1316
"George Sakkis" <ge...ail.comwrote:

Didn't have much luck with this in the Pyro mailing list so I am
trying here, just in case. I have a Pyro server running as a daemon
process and occasionally (typically after several hours or days of
uptime) a ConnectionClosedError is raised when a client calls a remote
method. Both client and server run on the same machine, so I don't
think it's an actual network connectivity issue. The problem is that
once this happens, it is persistent; retrying to call a few times does
not work although the server process is still alive. The current
"solution" is to manually kill the server and restart it but obviously
this is not ideal. Is there a way to either prevent or at least
recover automatically the server when it hangs ?
If restarting the server sorts it, why don't you run the server as a
subprocess in a higher level script, and exit with an error code
if the error strikes?

something like:

While True:
error = os.system('python current_server_name.py')
if error:
print 'Restarting the server - error returned was:',error
continue
else:
break

It would obviously need a try - except in the existing
code to catch the exception, and some jiggery-pokery
if the code is threaded to ensure a "clean error exit",
but apart from that, I can't think of a reason for it not
to work.

It may be that the reason for your hang up is also a
threading issue - it could be that the server is alive but
that some critical thread has been killed by the error.
But here I am guessing...

- Hendrik
Oct 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: hyperbob | last post by:
Hi, I'm working on a distributed application using Pyro, and I've come across several issues I'm not really sure how to handle, since this is my first distributed application. My application...
2
by: Peter Gordon | last post by:
Is there somethin like tcl "send" command in Python. I would like to be able to exucate calls in a python program on one machine from another machine.
0
by: adam | last post by:
I'm using Pyro to develop a distribuited system running my integration test suite I've found a strange behaviour it seems that whenever I have a failed resolve or unregister on a name server,...
38
by: writeson | last post by:
Hi all, At work I'm considering proposing a solution for our distributed processing system (a web based shopping cart that feeds an actual printing production line) based on Pyro. I've done some...
0
by: Sells, Fred | last post by:
I'm using ActiveState python on a windows box to talk to ACtive Directory. I'm running a Pyro Server on the same box. The client is Linux running std Python 2.4. It works just fine until the...
2
by: jamitwidme | last post by:
Hello everyone Can someone help me fix this problem? I am using an example from Pyro(Python Remote Object) website directly. It is the last example from...
0
by: Irmen de Jong | last post by:
I'm happy to announce Pyro 3.8 -- Python's own powerful remote method invocation technology! You can get it via http://pyro.sourceforge.net, then go to the SF project homepage download area. ...
0
by: Chuckk Hubbard | last post by:
The docs say to try to discover the URI on my own if this happens. Could I get a hand doing that? This isn't just something I want to solve on my machine, e.g. by changing my network setup or what...
0
by: Chuckk Hubbard | last post by:
OK, I think I have it. The Manual says to start a Name Server "using the ns command", and I figured out that means using the pyro-ns script. On Mon, Nov 10, 2008 at 10:49 AM, Chuckk Hubbard...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.