I have the following set-up under which Zope occasionally dies. Zope 2.2.2 (same happened with 2.2.0 and 2.2.1) RedHat Linux 6.2 Apache 1.3.12 - with fastcgi/2.2.8 and OpenSSL/0.95a I'm running Zope with Fastcgi and using Apache rewrite rules to redirect all URLs that contain "manage" to https. It seems to work fine except on occasion Zope will die with the following error: "ZServer uncaptured python exception, closing channel <FCGIChannel connected 127.0.0.1:2198 at 87195b> (socket.error:(32, 'Broken pipe') [path_to_Zope/Zserver/medusa/asynchat.py|initiate_send||211] [path_to_Zope/Zserver/medusa/asynchat.py|send|274]) This doesn't always mean the server is dead but it is the only error I can trap with debug turned on. I am starting the Zope server with the -Z option. Ideas. I'm about ready to start making the server more widely available but cannot if the server is unreliable. Ideas, strategies, options? TIA Ron Roeber
"Ronald L. Roeber" wrote:
Zope 2.2.2 (same happened with 2.2.0 and 2.2.1) RedHat Linux 6.2 Apache 1.3.12 - with fastcgi/2.2.8 and OpenSSL/0.95a
"ZServer uncaptured python exception, closing channel <FCGIChannel connected 127.0.0.1:2198 at 87195b> (socket.error:(32, 'Broken pipe') [path_to_Zope/Zserver/medusa/asynchat.py|initiate_send||211] [path_to_Zope/Zserver/medusa/asynchat.py|send|274])
I know this won't be much help, but this Apache: Server: Apache/1.3.12 (Unix) mod_ssl/2.6.2 OpenSSL/0.9.5 PHP/4.0.0 mod_fastcgi/2.2.3 mod_perl/1.22 Running with Zope 2.2.1, FastCGI has run reliably since the program was first started. There were problems around Zope 2.1, but they were cured by stealing the latest FastCGI stuff from CVS. Now, it runs without any difficulty. I wish I knew more. ...jhw
On Wed, 27 Sep 2000, Ronald L. Roeber wrote:
I have the following set-up under which Zope occasionally dies.
Zope 2.2.2 (same happened with 2.2.0 and 2.2.1) RedHat Linux 6.2 Apache 1.3.12 - with fastcgi/2.2.8 and OpenSSL/0.95a
what about apache error log? anything there?
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine as you woke this morning, and open up your eyes, did you notice the tear stains lining your face were mine..
On Thu, 28 Sep 2000, Bak @ kedai wrote:
On Wed, 27 Sep 2000, Ronald L. Roeber wrote:
I have the following set-up under which Zope occasionally dies.
Zope 2.2.2 (same happened with 2.2.0 and 2.2.1) RedHat Linux 6.2 Apache 1.3.12 - with fastcgi/2.2.8 and OpenSSL/0.95a
what about apache error log? anything there?
Two types of messages:
First in its death throws: [Wed Sep 27 16:54:08 2000] [error] [client 192.168.2.52] FastCGI: comm with server "apache_server_path/htdocs/zope" aborted: idle timeout (30 sec) And later when its all over: [Thu Sep 28 08:07:11 2000] [error] [client 192.168.2.52] (111)Connection refused : FastCGI: failed to connect to server "apache_server_path/htdocs/zope": connect() failed It will run fine for quite some time but then it dies. There are no other refereces to zope in the error logs. I am looking into possible network issues. I will likely try daemontools this weekend. Thanks for your help. Ron...
_______________________________________________
Two types of messages:
First in its death throws: [Wed Sep 27 16:54:08 2000] [error] [client 192.168.2.52] FastCGI: comm with server "apache_server_path/htdocs/zope" aborted: idle timeout (30 sec)
And later when its all over: [Thu Sep 28 08:07:11 2000] [error] [client 192.168.2.52] (111)Connection refused
: FastCGI: failed to connect to server "apache_server_path/htdocs/zope":
connect() failed
It will run fine for quite some time but then it dies. There are no other refereces to zope in the error logs. I am looking into possible network issues. I will likely try daemontools this weekend.
i've seen this problem only when there's a lot of connection;s usually more than 100 connections at any one time. to test this out, maybe you can use apache ab and step up until something breaks. also, try setting fastcgiexternalserver with -appConnTimeout 0 tell us how it goes.
Thanks for your help.
Ron...
_______________________________________________
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine if you SMELLLLLLL ... what the Rock is cookin
Hi, I am writing a dtml method that deletes data from a database, and I found myself unable to do this. It seems that ZSQL is used to insert, update and query a database. but can not use "delete from table where var=<dtml-var foo>" I am surprised at this behaviour. Am I doing somehting worng? or this is how it works? Is there any information on how to do this somewhere??? Thanks in advance. Adonis -- Adonis El Fakih - President, CEO -- EGS, Inc. 70 Boston Road, Suite A301, Chelmsford MA 01824 USA Fax (978) 244-0544 - adonis@egsx.com
----- Original Message ----- From: <technews@egsx.com> To: <zope@zope.org> Sent: Friday, September 29, 2000 5:17 AM Subject: [Zope] Deleting data using ZSQL
Hi,
I am writing a dtml method that deletes data from a database, and I found myself unable to do this. It seems that ZSQL is used to insert, update and query a database. but can not use "delete from table where var=<dtml-var foo>"
delete from table where var= <dtml-sqlvar foo type=string> in your Z SQL method will do the trick, at least it does for me cb
technews@egsx.com wrote:
"delete from table where var=<dtml-var foo>"
I am surprised at this behaviour. Am I doing somehting worng? or this is how it works? Is there any information on how to do this somewhere???
This should work :-) What error messaegs are you getting? What DB and DA are you using? What version of Zope? ...any other info you can think of might be useful... cheers, Chris
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of technews@egsx.com Sent: Thursday, September 28, 2000 10:17 PM To: zope@zope.org Subject: [Zope] Deleting data using ZSQL
Hi,
I am writing a dtml method that deletes data from a database, and I found myself unable to do this. It seems that ZSQL is used to insert, update and query a database. but can not use "delete from table where var=<dtml-var foo>"
delete from this_table where var=<dtml-sqlvar foo type=string> is what I use (Changing type accordingly of course).
Steve, Your user for the dataase does have permission to delete does it? Phil ----- Original Message ----- From: "Steve Drees" <drees@the-bridge.net> To: <technews@egsx.com>; <zope@zope.org> Sent: Friday, September 29, 2000 3:00 PM Subject: RE: [Zope] Deleting data using ZSQL
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of technews@egsx.com Sent: Thursday, September 28, 2000 10:17 PM To: zope@zope.org Subject: [Zope] Deleting data using ZSQL
Hi,
I am writing a dtml method that deletes data from a database, and I
found
myself unable to do this. It seems that ZSQL is used to insert, update and query a database. but can not use "delete from table where var=<dtml-var foo>"
delete from this_table where var=<dtml-sqlvar foo type=string> is what I use (Changing type accordingly of course).
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Thu, Sep 28, 2000 at 11:17:03PM -0400, technews@egsx.com wrote:
Hi,
I am writing a dtml method that deletes data from a database, and I found myself unable to do this. It seems that ZSQL is used to insert, update and query a database. but can not use "delete from table where var=<dtml-var foo>"
Two things, both previusly said, but both worth expanding on: 1) What you are doing is not type-safe and not data-safe. If var is a string, for example, that contains "this; delete from table;" You would probably not like the result. (Most SQLs would delete everything in the table!). At least, you have to do "delete from table where var='<dtml-var foo>'"` (if var is string). This is still not data-safe. A string like "this'; delete from table; update table where var=NAME set var='" is just as nasty as the previous one, although it is a bit harder for a drooling idiot to think of. delete from table where var=<dtml-sqlvar foo type=string> is perfectly data-safe. Dtml-sqlvar does two things for you: It embeds the item in the type of quotes appropriate for the TYPE= construct, AND it quotes (escapes) any characters passed to it. This makes sure that any strings are strings, and cannot contain hidden live commands. (It would make the second example expand to something like delete from table where var='this\'; delete from table; update table where var=NAME set var=\'' And this is a perfectly legal SQL statement that probably does no deletion, but does no harm either! 2) You may be seeing a DB-admin problem, rather than a ZSQL problem, make sure your Zope DB-user account has delete permission. Jim Penny
On Fri, 29 Sep 2000, kedai@kedai.com.my wrote:
Two types of messages:
First in its death throws: [Wed Sep 27 16:54:08 2000] [error] [client 192.168.2.52] FastCGI: comm with server "apache_server_path/htdocs/zope" aborted: idle timeout (30 sec)
And later when its all over: [Thu Sep 28 08:07:11 2000] [error] [client 192.168.2.52] (111)Connection refused
: FastCGI: failed to connect to server "apache_server_path/htdocs/zope":
connect() failed
It will run fine for quite some time but then it dies. There are no other refereces to zope in the error logs. I am looking into possible network issues. I will likely try daemontools this weekend.
i've seen this problem only when there's a lot of connection;s usually more than 100 connections at any one time. to test this out, maybe you can use apache ab and step up until something breaks.
also, try setting fastcgiexternalserver with -appConnTimeout 0
tell us how it goes.
follow up on my own mail: i did an ab test, on Apache/1.3.12 (Unix) (Red Hat/Linux) mod_fastcgi/2.2.4 and it seems that zserver restarted after awhile. it restarted a few times during ab. ab -n 200 -c 50 these messages in stupid.log --- a few iteration snipped---- 2000-09-29T04:01:27 INFO(0) ZServer FastCGI Server (V1.0) started at Fri Sep 29 12:01:27 2000 IP : Port : 8999 Socket path : None ------ 2000-09-29T04:01:57 ERROR(200) zdaemon zdaemon: Fri Sep 29 12:01:57 2000: Aiieee! 29643 exited with error code: 13 ------ 2000-09-29T04:01:57 INFO(0) zdaemon zdaemon: Fri Sep 29 12:01:57 2000: Houston, we have forked ------ 2000-09-29T04:01:57 INFO(0) zdaemon zdaemon: Fri Sep 29 12:01:57 2000: Houston, we have forked ------ 2000-09-29T04:01:57 INFO(0) zdaemon zdaemon: Fri Sep 29 12:01:57 2000: Hi, I just forked off a kid: 29656 --------------- anybody can point out to me what's happening?
Thanks for your help.
Ron...
_______________________________________________
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine Just bring it!
Two types of messages:
First in its death throws: [Wed Sep 27 16:54:08 2000] [error] [client 192.168.2.52] FastCGI: comm with server "apache_server_path/htdocs/zope" aborted: idle timeout (30 sec)
And later when its all over: [Thu Sep 28 08:07:11 2000] [error] [client 192.168.2.52] (111)Connection refused
: FastCGI: failed to connect to server "apache_server_path/htdocs/zope":
connect() failed
It will run fine for quite some time but then it dies. There are no other refereces to zope in the error logs. I am looking into possible network issues. I will likely try daemontools this weekend.
i've seen this problem only when there's a lot of connection;s usually more than 100 connections at any one time. to test this out, maybe you can use apache ab and step up until something breaks.
I can't seem to break it... ab -n 1500 -c 300 I get the same errors as in my original posting but Zope doesn't die. I left it alone after these tests and it died about 25 minutes later with noone using it. (its behind a firewall) This weekend I installed daemontools and can keep it running or at least restart it. The problem is most definitely not with load. I probably has to do with the way I have (mis)configured it. But for the life of me I can't see what it would be. Another odd thing with this set up is that some page requests from Netscape 4.x clients are very slow for what they are doing. IE and the new Mozilla engine are lightening fast...same page. Doesn't matter what platform of Netscape(*nix, Windows,Mac). The EventFolder product is the most obvious case. It locks Netscape for minutes while IE and Moz browsers load the page just fine. I will try some other things. Thanks for the ideas.
also, try setting fastcgiexternalserver with -appConnTimeout 0
Did this, doesn't seem to make a difference...
tell us how it goes.
Thanks for your help.
Ron...
_______________________________________________
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
--
http://www.kedai.com.my/kk http://www.kedai.com.my/eZine
if you SMELLLLLLL ... what the Rock is cookin
participants (11)
-
Bak @ kedai -
Chris Withers -
John Hayward-Warburton (Programming account) -
jpenny@universal-fasteners.com -
Kees de Brabander -
Phil Harris -
ron@pygoscelis.deal.edu -
Ronald L. Roeber -
Ronald L. Roeber -
Steve Drees -
technews@egsx.com