ZServer *still* dying - help?
:o( The situation is this - I have a database-driven website that backs onto a Postgres 7.1RC1 server - this does not affect the problem, the same thing happens with a 7.0.3 and 7.0.2 server on either the same or different machines. I have tried using PoPy/ZPoPyDA or psycopg/ZPsycopgDA - the same problem occurs with both. I have been able to reproduct this on a minimal install of 2.3.1 (no other products). What's happening - I have a PythonScript that does this: m = container.machine.SQL_get(machineid=machineid)[0] print container.machine.show_html(context,REQUEST, param1=m.param1, param2=m.param2, param3=m.param3, param4=m.param4, param5=m.param5, param6=m.param6, param7=m.param7, param8=m.param8, param9=m.param9, param0=m.param0) return printed show_html is a DTML document. When called at "high" speed (2-3 times a second) by URL traversal (i.e. GETing http://site.name/Zope/path/pythonscript?machineid=whatever) this causes either (in order of likelihood): 1) The 4 child threads of ZServer to die, leaving only the top-level and child thread, and a core file 2) *One* of the child threads to die, causing the rest of Zope to completely hang (hung inside a SIGSTOP) 3) The entire thing to bomb out *But*, if I reduce the number of named parameters to the DTML method (when of course it doesn't render properly) then everything's OK. The current code dies if there are >8 named parameters. But it seems to vary. I thought that the parameters had to be records from an SQL query, but now I'm not so sure. If anyone has any ideas, I'd be glad to hear them. Failing that, I'm giving up :o) Regards, Phil +----------------------------------+ | Phil Mayers, Network Support | | Centre for Computing Services | | Imperial College | +----------------------------------+
Does the problem happen without the SQL call? E.g., can you just pass show_html >8 parameters of dummy data and have it crash? ----- Original Message ----- From: "Mayers, Philip J" <p.mayers@ic.ac.uk> To: <zope@zope.org> Sent: Thursday, April 05, 2001 12:07 PM Subject: [Zope] ZServer *still* dying - help?
:o(
The situation is this - I have a database-driven website that backs onto a Postgres 7.1RC1 server - this does not affect the problem, the same thing happens with a 7.0.3 and 7.0.2 server on either the same or different machines.
I have tried using PoPy/ZPoPyDA or psycopg/ZPsycopgDA - the same problem occurs with both.
I have been able to reproduct this on a minimal install of 2.3.1 (no other products).
What's happening - I have a PythonScript that does this:
m = container.machine.SQL_get(machineid=machineid)[0] print container.machine.show_html(context,REQUEST, param1=m.param1, param2=m.param2, param3=m.param3, param4=m.param4, param5=m.param5, param6=m.param6, param7=m.param7, param8=m.param8, param9=m.param9, param0=m.param0) return printed
show_html is a DTML document. When called at "high" speed (2-3 times a second) by URL traversal (i.e. GETing http://site.name/Zope/path/pythonscript?machineid=whatever) this causes either (in order of likelihood):
1) The 4 child threads of ZServer to die, leaving only the top-level and child thread, and a core file 2) *One* of the child threads to die, causing the rest of Zope to completely hang (hung inside a SIGSTOP) 3) The entire thing to bomb out
*But*, if I reduce the number of named parameters to the DTML method (when of course it doesn't render properly) then everything's OK. The current code dies if there are >8 named parameters. But it seems to vary. I thought that the parameters had to be records from an SQL query, but now I'm not so sure.
If anyone has any ideas, I'd be glad to hear them. Failing that, I'm giving up :o)
Regards, Phil
+----------------------------------+ | Phil Mayers, Network Support | | Centre for Computing Services | | Imperial College | +----------------------------------+
_______________________________________________ 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 )
I don't know what's happening, but what about attaching the params to the REQUEST, then you don't have to send them separately. Of course, you'd have to rewrite show_html a bit, but it shouldn't take much doing. Then you would write things like ... <dtml-call "REQUEST.set('param1',m.param1)"> ... print container.machine.show_html(context,REQUEST) Or make the separate params into a single python list and pass the list: params=[m.param1,m.param2,...] print container.machine.show_html(context,REQUEST,params) Cheers, Tom P Mayers, Philip J asked -
What's happening - I have a PythonScript that does this:
m = container.machine.SQL_get(machineid=machineid)[0] print container.machine.show_html(context,REQUEST, param1=m.param1, param2=m.param2, param3=m.param3, param4=m.param4, param5=m.param5, param6=m.param6, param7=m.param7, param8=m.param8, param9=m.param9, param0=m.param0) return printed
show_html is a DTML document. When called at "high" speed (2-3 times a second) by URL traversal (i.e. GETing http://site.name/Zope/path/pythonscript?machineid=whatever) this causes either (in order of likelihood): ...
*But*, if I reduce the number of named parameters to the DTML method (when of course it doesn't render properly) then everything's OK. The current code dies if there are >8 named parameters. But it seems to vary. I thought that the parameters had to be records from an SQL query, but now I'm not so sure.
It still shouldn't be crashing. I wrote a unit test for this!! (testParam26 in the test suite) ;-) Wonder if it passes... it does. Darn. What Zope version is this? ----- Original Message ----- From: "Thomas B. Passin" <tpassin@mitretek.org> To: <zope@zope.org> Sent: Thursday, April 05, 2001 12:49 PM Subject: Re: [Zope] ZServer *still* dying - help?
I don't know what's happening, but what about attaching the params to the REQUEST, then you don't have to send them separately. Of course, you'd have to rewrite show_html a bit, but it shouldn't take much doing.
Then you would write things like ... <dtml-call "REQUEST.set('param1',m.param1)"> ... print container.machine.show_html(context,REQUEST)
Or make the separate params into a single python list and pass the list:
params=[m.param1,m.param2,...] print container.machine.show_html(context,REQUEST,params)
Cheers,
Tom P
Mayers, Philip J asked -
What's happening - I have a PythonScript that does this:
m = container.machine.SQL_get(machineid=machineid)[0] print container.machine.show_html(context,REQUEST, param1=m.param1, param2=m.param2, param3=m.param3, param4=m.param4, param5=m.param5, param6=m.param6, param7=m.param7, param8=m.param8, param9=m.param9, param0=m.param0) return printed
show_html is a DTML document. When called at "high" speed (2-3 times a second) by URL traversal (i.e. GETing http://site.name/Zope/path/pythonscript?machineid=whatever) this causes either (in order of likelihood): ...
*But*, if I reduce the number of named parameters to the DTML method (when of course it doesn't render properly) then everything's OK. The current code dies if there are >8 named parameters. But it seems to vary. I thought that the parameters had to be records from an SQL query, but now I'm not so sure.
_______________________________________________ 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 )
Wait, no I *didnt* write a unit test for this. Sorry! I wrote a unit test that sends lots of named parameters to a python script, not a dtml method... If you can boil this down to an always-fails case we can fix it. ----- Original Message ----- From: "Chris McDonough" <chrism@digicool.com> To: "Thomas B. Passin" <tpassin@mitretek.org>; <zope@zope.org> Sent: Thursday, April 05, 2001 12:56 PM Subject: Re: [Zope] ZServer *still* dying - help?
It still shouldn't be crashing.
I wrote a unit test for this!! (testParam26 in the test suite) ;-) Wonder if it passes... it does. Darn.
What Zope version is this?
----- Original Message ----- From: "Thomas B. Passin" <tpassin@mitretek.org> To: <zope@zope.org> Sent: Thursday, April 05, 2001 12:49 PM Subject: Re: [Zope] ZServer *still* dying - help?
I don't know what's happening, but what about attaching the params to the REQUEST, then you don't have to send them separately. Of course, you'd have to rewrite show_html a bit, but it shouldn't take much doing.
Then you would write things like ... <dtml-call "REQUEST.set('param1',m.param1)"> ... print container.machine.show_html(context,REQUEST)
Or make the separate params into a single python list and pass the list:
params=[m.param1,m.param2,...] print container.machine.show_html(context,REQUEST,params)
Cheers,
Tom P
Mayers, Philip J asked -
What's happening - I have a PythonScript that does this:
m = container.machine.SQL_get(machineid=machineid)[0] print container.machine.show_html(context,REQUEST, param1=m.param1, param2=m.param2, param3=m.param3, param4=m.param4, param5=m.param5, param6=m.param6, param7=m.param7, param8=m.param8, param9=m.param9, param0=m.param0) return printed
show_html is a DTML document. When called at "high" speed (2-3 times a second) by URL traversal (i.e. GETing http://site.name/Zope/path/pythonscript?machineid=whatever) this
causes
either (in order of likelihood): ...
*But*, if I reduce the number of named parameters to the DTML method (when of course it doesn't render properly) then everything's OK. The current code dies if there are >8 named parameters. But it seems to vary. I thought that the parameters had to be records from an SQL query, but now I'm not so sure.
_______________________________________________ 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 )
_______________________________________________ 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 )
participants (3)
-
Chris McDonough -
Mayers, Philip J -
Thomas B. Passin