From tchur at optushome.com.au Sat Jan 8 11:59:05 2005 From: tchur at optushome.com.au (Tim Churches) Date: Sat, 08 Jan 2005 11:59:05 +1100 Subject: [albatross-users] Release of some open source projects which make extensive use of Albatross Message-ID: <41DF3059.80402@optushome.com.au> See http://www.netepi.org I announced these projects on the Python mailing list, but members of this list may not realise that the Web interfaces for these projects are built with Albatross. The NetEpi Case Manager application in particular makes Albatross jump through hoops backwards, especially the admin app - all due to the genius of Andrew McNamara's coding, and of course, Albatross itself (and the equal genius of Dave Cole). The NetEpi projects will be undergoing further, intensive development during the first half of 2005, so expect more Albatross capabilities to be highlighted. Cheers, Tim C From sheila at thinkspot.net Sun Jan 9 07:36:12 2005 From: sheila at thinkspot.net (Sheila King) Date: Sat, 08 Jan 2005 12:36:12 -0800 Subject: [albatross-users] "Broken Pipe" tracebacks... Message-ID: <24476E4C57A0406375D1602F@lsanca1-ar1-4-62-158-245.lsanca1.dsl-verizon.net> Hello, I'm running a project that uses Albatross. Finally released our big project in December. Only, technically, accessible to our own clients with accounts, though... http://www.QuestAdmin.net (It's still kind of beta-ish, but good enough that we made it available to our clients so they can view billing statements and such...) I have the application set up to send me emails of the full Python traceback if there are any "unhandled" exceptions, which I then trap and redirect to an error page. There is one type of error, however, that I'm seeing off and on... namely the "Broken Pipe" error. Here is a portion of a traceback: (the last few lines of it...) File "albatross/context.py", line 123, in flush_content self.send_content(data) File "albatross/app.py", line 107, in send_content self.request.write_content(data) File "albatross/cgiapp.py", line 52, in write_content sys.stdout.flush() IOError: [Errno 32] Broken pipe Because we are running this app as CGI, and because I have, in test use, actually caused this error myself but not been redirected to the error page mentioned above, I think this is just a case of the connection to the browser being closed before the cgiapp was able to completely flush the content? (We are running the latest stable version of albatross... 1.20.) Was hoping for confirmation on this before I have my email function disregard sending me emails of tracebacks for this particular error... Thanks for any insights or clues... -- Sheila King http://www.thinkspot.net/sheila/ http://www.k12groups.org From neel at mediapulse.com Mon Jan 10 06:00:51 2005 From: neel at mediapulse.com (Michael C. Neel) Date: Sun, 9 Jan 2005 14:00:51 -0500 Subject: [albatross-users] "Broken Pipe" tracebacks... References: <24476E4C57A0406375D1602F@lsanca1-ar1-4-62-158-245.lsanca1.dsl-verizon.net> Message-ID: <000701c4f67d$8a4f6360$0400a8c0@clapton> I can't offer you soild confirmation; but I can say I think you're right. We have seen this mostly on apache 1.3 systems with mod_python that approach a moderate load. Moving sites to Apache 2.0 and also decreasing the traffic to an Apache 1.3 box has shown to decrease the amount of these IOErrors. Apache 2.0 shows almost none of these errors. We've spent a good amount of effort tracking these down, and it looks like more to do with Apache 1.3 with mod_python than anything of Albatross. Our setup isn't exactly the same as yours, as we use the mod_python content handler to invoke Albatross over cgi, but I'd guess it's the same issue, esp if you are on Apache 1.3. Mike ----- Original Message ----- From: "Sheila King" To: Sent: Saturday, January 08, 2005 3:36 PM Subject: [albatross-users] "Broken Pipe" tracebacks... > Hello, > > I'm running a project that uses Albatross. Finally released our big > project > in December. Only, technically, accessible to our own clients with > accounts, though... > > http://www.QuestAdmin.net > (It's still kind of beta-ish, but good enough that we made it available to > our clients so they can view billing statements and such...) > > I have the application set up to send me emails of the full Python > traceback if there are any "unhandled" exceptions, which I then trap and > redirect to an error page. > > There is one type of error, however, that I'm seeing off and on... > namely the "Broken Pipe" error. Here is a portion of a traceback: > > (the last few lines of it...) > > File "albatross/context.py", line 123, in flush_content > self.send_content(data) > File "albatross/app.py", line 107, in send_content > self.request.write_content(data) > File "albatross/cgiapp.py", line 52, in write_content > sys.stdout.flush() > IOError: [Errno 32] Broken pipe > > > Because we are running this app as CGI, and because I have, in test use, > actually caused this error myself but not been redirected to the error > page > mentioned above, I think this is just a case of the connection to the > browser being closed before the cgiapp was able to completely flush the > content? > (We are running the latest stable version of albatross... 1.20.) > > Was hoping for confirmation on this before I have my email function > disregard sending me emails of tracebacks for this particular error... > > Thanks for any insights or clues... > > -- > Sheila King > http://www.thinkspot.net/sheila/ > http://www.k12groups.org > _______________________________________________ > Albatross-users mailing list > Albatross-users at object-craft.com.au > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users > From sheila at thinkspot.net Mon Jan 10 09:16:05 2005 From: sheila at thinkspot.net (Sheila King) Date: Sun, 09 Jan 2005 14:16:05 -0800 Subject: [albatross-users] "Broken Pipe" tracebacks... In-Reply-To: <000701c4f67d$8a4f6360$0400a8c0@clapton> References: <24476E4C57A0406375D1602F@lsanca1-ar1-4-62-158-245.lsanca1.dsl-ve rizon.net> <000701c4f67d$8a4f6360$0400a8c0@clapton> Message-ID: <8D3B229834505329CFE03967@lsanca1-ar1-4-62-158-245.lsanca1.dsl-verizon.net> Hello Michael, Thanks for the response. Yes, we are running Apache 1.3. Not mod_python, but just usual cgi. Your comments do seem to corroborate though with what I am seeing. I doubt we are moving to Apache 2.0 any time soon... I will pass your remarks on to our Sysadmin, though, for his information... Thanks again, -- Sheila King http://www.thinkspot.net/sheila/ http://www.k12groups.org --On Sunday, January 09, 2005 2:00 PM -0500 "Michael C. Neel" wrote: Date: Sunday, January 09, 2005 2:00 PM -0500 From: "Michael C. Neel" Subject: Re: [albatross-users] "Broken Pipe" tracebacks... To: Sheila King , albatross-users at object-craft.com.au > I can't offer you soild confirmation; but I can say I think you're right. > We have seen this mostly on apache 1.3 systems with mod_python that > approach a moderate load. Moving sites to Apache 2.0 and also > decreasing the traffic to an Apache 1.3 box has shown to decrease the > amount of these IOErrors. Apache 2.0 shows almost none of these errors. > > We've spent a good amount of effort tracking these down, and it looks > like more to do with Apache 1.3 with mod_python than anything of > Albatross. Our setup isn't exactly the same as yours, as we use the > mod_python content handler to invoke Albatross over cgi, but I'd guess > it's the same issue, esp if you are on Apache 1.3. > > Mike > > ----- Original Message ----- > From: "Sheila King" > To: > Sent: Saturday, January 08, 2005 3:36 PM > Subject: [albatross-users] "Broken Pipe" tracebacks... > > >> Hello, >> >> I'm running a project that uses Albatross. Finally released our big >> project >> in December. Only, technically, accessible to our own clients with >> accounts, though... >> >> http://www.QuestAdmin.net >> (It's still kind of beta-ish, but good enough that we made it available >> to our clients so they can view billing statements and such...) >> >> I have the application set up to send me emails of the full Python >> traceback if there are any "unhandled" exceptions, which I then trap and >> redirect to an error page. >> >> There is one type of error, however, that I'm seeing off and on... >> namely the "Broken Pipe" error. Here is a portion of a traceback: >> >> (the last few lines of it...) >> >> File "albatross/context.py", line 123, in flush_content >> self.send_content(data) >> File "albatross/app.py", line 107, in send_content >> self.request.write_content(data) >> File "albatross/cgiapp.py", line 52, in write_content >> sys.stdout.flush() >> IOError: [Errno 32] Broken pipe >> >> >> Because we are running this app as CGI, and because I have, in test use, >> actually caused this error myself but not been redirected to the error >> page >> mentioned above, I think this is just a case of the connection to the >> browser being closed before the cgiapp was able to completely flush the >> content? >> (We are running the latest stable version of albatross... 1.20.) >> >> Was hoping for confirmation on this before I have my email function >> disregard sending me emails of tracebacks for this particular error... >> >> Thanks for any insights or clues... >> >> -- >> Sheila King >> http://www.thinkspot.net/sheila/ >> http://www.k12groups.org >> _______________________________________________ >> Albatross-users mailing list >> Albatross-users at object-craft.com.au >> https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users >> > > _______________________________________________ > Albatross-users mailing list > Albatross-users at object-craft.com.au > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users > From djc at object-craft.com.au Mon Jan 10 10:04:56 2005 From: djc at object-craft.com.au (Dave Cole) Date: Mon, 10 Jan 2005 10:04:56 +1100 Subject: [albatross-users] "Broken Pipe" tracebacks... In-Reply-To: <24476E4C57A0406375D1602F@lsanca1-ar1-4-62-158-245.lsanca1.dsl-verizon.net> References: <24476E4C57A0406375D1602F@lsanca1-ar1-4-62-158-245.lsanca1.dsl-verizon.net> Message-ID: <41E1B898.1040104@object-craft.com.au> Sheila King wrote: > Hello, > > I'm running a project that uses Albatross. Finally released our big project > in December. Only, technically, accessible to our own clients with > accounts, though... > > http://www.QuestAdmin.net > (It's still kind of beta-ish, but good enough that we made it available to > our clients so they can view billing statements and such...) > > I have the application set up to send me emails of the full Python > traceback if there are any "unhandled" exceptions, which I then trap and > redirect to an error page. > > There is one type of error, however, that I'm seeing off and on... > namely the "Broken Pipe" error. Here is a portion of a traceback: > > (the last few lines of it...) > > File "albatross/context.py", line 123, in flush_content > self.send_content(data) > File "albatross/app.py", line 107, in send_content > self.request.write_content(data) > File "albatross/cgiapp.py", line 52, in write_content > sys.stdout.flush() > IOError: [Errno 32] Broken pipe > > > Because we are running this app as CGI, and because I have, in test use, > actually caused this error myself but not been redirected to the error page > mentioned above, I think this is just a case of the connection to the > browser being closed before the cgiapp was able to completely flush the > content? > (We are running the latest stable version of albatross... 1.20.) > > Was hoping for confirmation on this before I have my email function > disregard sending me emails of tracebacks for this particular error... > > Thanks for any insights or clues... I think something like the following might explain what you are seeing... The user is not waiting for the page from the server before browsing to another page. In order to retrieve the new page, the browser is closes the connection to the server for the current unretrieved page and opens a new connection for the new request. I am not entirely sure how Apache would handle this. The CGI request is handled by Apache forking a child process and reading STDOUT of that process via a pipe as the browser response. There are a number of ways that Apache could handle a closed browser connection. It could immediately close the pipe to the child process, or it could read and discard the output from the child process. A further complication to the Apache behaviour is that each Apache process will only serve a limited number of browser requests before exiting. Presumably Apache determines that it has served a browser request if the browser closes the connection for that request. If the closed browser connection described above is the last request that will be served, does the Apache process terminate immediately (before reading the lingering CGI process STDOUT)? In any event, the broken pipe exception seems to indicate that Apache has closed the pipe used to read the STDOUT from the CGI process. - Dave -- http://www.object-craft.com.au