Re: Was:([Zope-dev] HELP PLEASE)

2001-10-17 Thread Andre Schubert

Hi,

After viewing all log-files, i have found out, that everytime when a
SQL-Method was called
and the SQL-Method takes several minutes to return a result then a erro
code 13 was raised.
Last time i change the DA from ZPygres to ZPsycopg, because of the error
code 13, but that was not the problem.
The problem seems that if a SQL-query takes several time, then the error
is raised.
There was a message from Shai Berger written on Mon, 06 Aug 2001
18:44:06 +0300 which describes(for me) this problem.

thanls as

Andre Schubert schrieb:
> 
> The only things i know, are the following lines in the stupid_log_file.
> 
> 2001-10-14T18:03:21 ERROR(200) zdaemon zdaemon: Sun Oct 14 20:03:21
> 2001: Aiieee! 32437 exited with error code: 13
> --
> 2001-10-14T18:03:21 INFO(0) zdaemon zdaemon: Sun Oct 14 20:03:21 2001:
> Houston, we have forked
> --
> 2001-10-14T18:03:21 INFO(0) zdaemon zdaemon: Sun Oct 14 20:03:21 2001:
> Houston, we have forked
> --
> 2001-10-14T18:03:21 INFO(0) zdaemon zdaemon: Sun Oct 14 20:03:21 2001:
> Hi, I just forked off a kid: 588
> 
> as
> 
> Richard Jones schrieb:
> >
> > On Monday 15 October 2001 17:09, Andre Schubert wrote:
> > > > Hi all,
> > > >
> > > > i have serious problems with my zope.
> > > > Last time he dies very often with error code 13,and since to today he
> > > > slows down extremly.
> > > > To view the Control_Panel/DebugForm it takes up to 1 minute and thats
> > > > not acceptable.
> > > >
> > > > How can i track down these problems.
> > > >
> > > > I run Zope-2.2.4 on Immunix-RedHat 6.2
> > >
> > > Hi, all
> > >
> > > Is there anybody, who can help me tracking down where the Error Code: 13
> > > comes from,
> > > it is very important for my Zope Installation.
> >
> > You probably need to give more information - like where this error code 13
> > appears. If it's an OSError or IOError, it's probably an Access Error (as
> > defined in the errno module, EACCES). What _that_ means depends entirely on
> > the _rest_ of the error, which you haven't supplied. A full traceback of the
> > error will go a long way to helping you.
> >
> >  Richard
> 
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] HELP PLEASE

2001-10-14 Thread Andre Schubert

The only things i know, are the following lines in the stupid_log_file.

2001-10-14T18:03:21 ERROR(200) zdaemon zdaemon: Sun Oct 14 20:03:21
2001: Aiieee! 32437 exited with error code: 13
--
2001-10-14T18:03:21 INFO(0) zdaemon zdaemon: Sun Oct 14 20:03:21 2001:
Houston, we have forked
--
2001-10-14T18:03:21 INFO(0) zdaemon zdaemon: Sun Oct 14 20:03:21 2001:
Houston, we have forked
--
2001-10-14T18:03:21 INFO(0) zdaemon zdaemon: Sun Oct 14 20:03:21 2001:
Hi, I just forked off a kid: 588

as

Richard Jones schrieb:
> 
> On Monday 15 October 2001 17:09, Andre Schubert wrote:
> > > Hi all,
> > >
> > > i have serious problems with my zope.
> > > Last time he dies very often with error code 13,and since to today he
> > > slows down extremly.
> > > To view the Control_Panel/DebugForm it takes up to 1 minute and thats
> > > not acceptable.
> > >
> > > How can i track down these problems.
> > >
> > > I run Zope-2.2.4 on Immunix-RedHat 6.2
> >
> > Hi, all
> >
> > Is there anybody, who can help me tracking down where the Error Code: 13
> > comes from,
> > it is very important for my Zope Installation.
> 
> You probably need to give more information - like where this error code 13
> appears. If it's an OSError or IOError, it's probably an Access Error (as
> defined in the errno module, EACCES). What _that_ means depends entirely on
> the _rest_ of the error, which you haven't supplied. A full traceback of the
> error will go a long way to helping you.
> 
>  Richard

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] HELP PLEASE

2001-10-14 Thread Richard Jones

On Monday 15 October 2001 17:09, Andre Schubert wrote:
> > Hi all,
> >
> > i have serious problems with my zope.
> > Last time he dies very often with error code 13,and since to today he
> > slows down extremly.
> > To view the Control_Panel/DebugForm it takes up to 1 minute and thats
> > not acceptable.
> >
> > How can i track down these problems.
> >
> > I run Zope-2.2.4 on Immunix-RedHat 6.2
>
> Hi, all
>
> Is there anybody, who can help me tracking down where the Error Code: 13
> comes from,
> it is very important for my Zope Installation.

You probably need to give more information - like where this error code 13 
appears. If it's an OSError or IOError, it's probably an Access Error (as 
defined in the errno module, EACCES). What _that_ means depends entirely on 
the _rest_ of the error, which you haven't supplied. A full traceback of the 
error will go a long way to helping you.


 Richard

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] HELP PLEASE

2001-10-14 Thread Andre Schubert

Hi, all

Is there anybody, who can help me tracking down where the Error Code: 13
comes from,
it is very important for my Zope Installation.

Thanks as

Andre Schubert schrieb:
> 
> Hi all,
> 
> i have serious problems with my zope.
> Last time he dies very often with error code 13,and since to today he
> slows down extremly.
> To view the Control_Panel/DebugForm it takes up to 1 minute and thats
> not acceptable.
> 
> How can i track down these problems.
> 
> I run Zope-2.2.4 on Immunix-RedHat 6.2
> 
> thanks a lot as
> 
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] HELP PLEASE

2001-10-12 Thread Andre Schubert

Hi,

i don't no what the problem was, but it was not the swap.
I found out, that if i took lynx on the same machine everything works
fine and fast, but if i
connect over our network everything slows down.
This happens until my sysop was at work.
I think there was a network problem, but i dont know this.
If this error occurs a second time a know what i have to do.

thanks as

Robert Rottermann schrieb:
> 
> I had this once (the slowing down) when an other process was eating up all
> memory and zope was constantly paged out.
> 
> Robert
> - Original Message -
> From: "Andre Schubert" <[EMAIL PROTECTED]>
> To: "zope" <[EMAIL PROTECTED]>
> Sent: Friday, October 12, 2001 6:49 AM
> Subject: [Zope-dev] HELP PLEASE
> 
> > Hi all,
> >
> > i have serious problems with my zope.
> > Last time he dies very often with error code 13,and since to today he
> > slows down extremly.
> > To view the Control_Panel/DebugForm it takes up to 1 minute and thats
> > not acceptable.
> >
> > How can i track down these problems.
> >
> > I run Zope-2.2.4 on Immunix-RedHat 6.2
> >
> > thanks a lot as
> >
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope )
> >
> 
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] HELP PLEASE

2001-10-11 Thread Robert Rottermann

I had this once (the slowing down) when an other process was eating up all
memory and zope was constantly paged out.

Robert
- Original Message -
From: "Andre Schubert" <[EMAIL PROTECTED]>
To: "zope" <[EMAIL PROTECTED]>
Sent: Friday, October 12, 2001 6:49 AM
Subject: [Zope-dev] HELP PLEASE


> Hi all,
>
> i have serious problems with my zope.
> Last time he dies very often with error code 13,and since to today he
> slows down extremly.
> To view the Control_Panel/DebugForm it takes up to 1 minute and thats
> not acceptable.
>
> How can i track down these problems.
>
> I run Zope-2.2.4 on Immunix-RedHat 6.2
>
> thanks a lot as
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] HELP PLEASE

2001-10-11 Thread Andre Schubert

Hi all,

i have serious problems with my zope.
Last time he dies very often with error code 13,and since to today he
slows down extremly.
To view the Control_Panel/DebugForm it takes up to 1 minute and thats
not acceptable.

How can i track down these problems.

I run Zope-2.2.4 on Immunix-RedHat 6.2

thanks a lot as

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Help, please!!! __call__ problems with DTML templates

2000-10-10 Thread Evan Simpson

From: Stephen Simmons <[EMAIL PROTECTED]>
> 1.)  How do you magically get the DTML context from '' without
> having to resort to '' in the templates?

A.isDocTemp = 1 # or make it a shared class attribute

> 2.)  How to convert an arbitrary text string into rendered DTML inside a
> python product method?

Here's what I use:

from Globals import HTML
from AccessControl import getSecurityManager

class DTML(HTML):
"""DTML objects are DocumentTemplate.HTML objects that allow
   dynamic, temporary creation of restricted DTML."""
def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw):
"""Render the DTML given a client object, REQUEST mapping,
Response, and key word arguments."""

security=getSecurityManager()
security.addContext(self)
try:
return apply(HTML.__call__, (self, client, REQUEST), kw)
finally: security.removeContext(self)

def validate(self, inst, parent, name, value, md):
return getSecurityManager().validate(inst, parent, name, value)

Cheers,

Evan @ digicool & 4-am


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Help, please!!! __call__ problems with DTML templates

2000-10-10 Thread Steve Alexander

Stephen Simmons wrote:

> 
> 2.)  How to convert an arbitrary text string into rendered DTML inside a
> python product method?
> How do you get the object's properties, REQUEST and acquisition context all
> in the namespace?
> 
> I've been trying code like:
>template = ' fmt="structured_text">'
>dtml = HTML(template, globals())
>rendered = dtml(self, REQUEST)

Here's an except from my Python interactive interpreter:

 >>> import DocumentTemplate
 >>> my_dt=DocumentTemplate.HTML("")
 >>> my_dt(None, {'a':4})
'5'

The object my_dt is callable, and takes the arguments (client, 
namespace). You can put a REQUEST in place of the simple dictionary I 
used above.

If you're trying this, make sure you have the PYTHONPATH environment 
variable set to /your/zope/directory/lib/python


--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Help, please!!! __call__ problems with DTML templates

2000-10-10 Thread Steve Alexander

Stephen Simmons wrote:

>
> 1.)  How do you magically get the DTML context from '' without
> having to resort to '' in the templates?

Give your class a class attribute of isDocTemp=1. This tells the DTML 
method calling machinery that you want to receive the namespace as 
REQUEST as the third argument to your __call__ method.

There was a thread on this in zope-dev on and around 26 September, 
subject "more __call__ ..."

> In the __call__ methods of different classes, I've seen some code like:
> 'if REQUEST is None and not kw: REQUEST=self.REQUEST' (from
> Catalog.py)

Your method will usually get called with its third argument as the 
namespace, or REQUEST. However, sometimes, it may just be called with a 
"self" argument. The code in Catalog.py is falling back on getting the 
REQUEST out of the self argument, if it is not explicitly passed a 
namespace to work with.

> I can't see any consistency in what these classes are doing, so I don't know
> what I need to do.

Most developers would like more consistency here :-)
I'm hoping that all this will be much much clearer for Zope 2.3. That 
doesn't help much for now though.

> 2.)  How to convert an arbitrary text string into rendered DTML inside a
> python product method?
> How do you get the object's properties, REQUEST and acquisition context all
> in the namespace?
> 
> I've been trying code like:
>template = ' fmt="structured_text">'
>dtml = HTML(template, globals())

If all you want to do is render some Structured Text, you can import and 
use the StructuredText module directly.

> P.S.  ChrisW, searching NIP for "__call__" returns every message with 'call'
> in it, which is not quite the same thing!

For cases like that, I have downloaded the plaintext mail archives as 
available from http://www.zope.org/Resources/MailingLists

I then use unix grep on them to search for just what I need.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Help, please!!! __call__ problems with DTML templates

2000-10-10 Thread Stephen Simmons

Today is not a good day:-( I've just spent 2 days trying to force
__call__ to render my product properly, got every error possible at least
seven times, and wasted last night working out what was wrong with Refresh
(I was calling refresh on the wrong product. Duh!).

Please, please, please, can someone point me in the right direction.

I have a class called Element which has three components:
1. purpose: a string describing the element's role (rendered as structured
text)
2. template: a string that is rendered to display the element (DTML)
3. Element inherits from Folder so it can contain sub-elements which can be
included in the template

For example, suppose A is an element that contains a sub-element B (i.e. B
is A.B)
  Ahas template 'Element A contains '
 and purpose 'Contain B'
  Bhas template 'element B, which contains nix'
and purpose 'Element with no subelement'

Now for the tricky bit: "" needs to be rendered one of three
possible ways depending on a variable in the REQUEST. So __call__ needs to
return one of
- case a:  the purpose property (as structured text) wrapped in []
- case b:  render the template, with sub-elements properly rendered
- case c:  render the template, with sub-elements wrapped in [] showing
their purpose

Then '' must be rendered in the three cases as:
 - case a:  '[Contain B]'
 - case b:  'Element A contains element B, which contains nix'
 - case c:  'Element A contains [Element with no subelement]'

To do this, I need to write my own __call__ method since __call__ is what
detemines how objects gets rendered in DTML (is this correct?)
 def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw):
With this, I discovered that '' gives client=None and REQUEST={}
while
'' gets client=_ and REQUEST=REQUEST.

But I cannot for the life of me, work out how to do what I need. In
particular:

1.)  How do you magically get the DTML context from '' without
having to resort to '' in the templates?

In the __call__ methods of different classes, I've seen some code like:
'if REQUEST is None and not kw: REQUEST=self.REQUEST' (from
Catalog.py)
and other code like
'if hasattr(self, 'aq_explicit'): bself=self.aq_explicit  else:
bself=self' and
'security=getSecurityManager()   security.addContext(self)'
(from DTMLDocument.py)
I can't see any consistency in what these classes are doing, so I don't know
what I need to do.

2.)  How to convert an arbitrary text string into rendered DTML inside a
python product method?
How do you get the object's properties, REQUEST and acquisition context all
in the namespace?

I've been trying code like:
   template = ''
   dtml = HTML(template, globals())
   rendered = dtml(self, REQUEST)
but this doesn't work. All the example classes I've seen (such as
ZWikiPage.py in ZWiki) use DTMLDocument as their base class so can call
DTMLDocument's __call__ on themselves as in
text = apply(DTMLDocument.__call__,(self, client, REQUEST, RESPONSE),
kw)(ZWikiPage.py, line 135)
This doesn't help me because I don't have DTMLDocument as a base class.
Looking through the source for DTMLMethod etc is not very clear because lots
of "apply(__call__,(...),kw)" calls are all mixed up with acquisition code.

3.)  Do I need to write a custom tag () to get this
behaviour?

So, if anyone out in Zope land can help me, I'll be eternally grateful. I've
exhausted my patience looking through the NIP mailing list archives, the
How-Tos and the Zope site and need to have something to demonstrate on
Thursday.

Thanks in advace,

Stephen

P.S.  ChrisW, searching NIP for "__call__" returns every message with 'call'
in it, which is not quite the same thing!
___
Stephen Simmons
HealthArena B.V.
phone +31 20 486 0555
mobile +31 6 1505 3086
[EMAIL PROTECTED]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )