Re: [Zope-dev] Can logreopen restarts Zope ?

2006-06-30 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 30 Jun 2006, at 14:30, Julien Anguenot wrote:
For maximum reliability I tend to forego the built-in log  
reopening in
favor of using the logrotate utility in copytruncate mode. This  
will
not require any log file reopening, logrotate will simply make a  
copy of
the existing log and then truncate the logfile that continues to  
be in
use to zero length. Zope or the ZEO server won't have to know or  
care at

all at that point.


Thank you Jens for the quick reply.

I think I'm going to send these instructions, to be on the safe  
side, to

the administrators taking care of the cluster.

Do you have any idea about the zopectl logreopen misbehavior as
someone who's avoiding using it explicitly ;) ?


I'm afraid I don't. I have seen issues myself where the server would  
just die and not come up again, but never investigated it. The  
logreopen solution offers a safe and lasting fix and it even  
simplifies log rotation configuration.


Here's a very simple one that rotates ZEO server and client logs for  
a simple one-client ZEO setup, we use it for www.zope.de:


[EMAIL PROTECTED] ~]$ cat /etc/logrotate.d/zope.de
/home/zope/zope.de/log/*.log {
weekly
rotate 10
missingok
compress
copytruncate
}


jens

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEpRxuRAx5nvEhZLIRAu2QAKCMo1tttOQGULCRcWlYcVRn4psWrwCfXoAk
1ycxYnJQNbCz/Ab+KYJUh+A=
=rYwK
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Can logreopen restarts Zope ?

2006-06-30 Thread Julien Anguenot
Jens Vagelpohl wrote:
 
 On 30 Jun 2006, at 14:30, Julien Anguenot wrote:
 For maximum reliability I tend to forego the built-in log reopening in
 favor of using the logrotate utility in copytruncate mode. This will
 not require any log file reopening, logrotate will simply make a copy of
 the existing log and then truncate the logfile that continues to be in
 use to zero length. Zope or the ZEO server won't have to know or care at
 all at that point.

 Thank you Jens for the quick reply.

 I think I'm going to send these instructions, to be on the safe side, to
 the administrators taking care of the cluster.

 Do you have any idea about the zopectl logreopen misbehavior as
 someone who's avoiding using it explicitly ;) ?
 
 I'm afraid I don't. I have seen issues myself where the server would
 just die and not come up again, but never investigated it. The logreopen
 solution offers a safe and lasting fix and it even simplifies log
 rotation configuration.
 
 Here's a very simple one that rotates ZEO server and client logs for a
 simple one-client ZEO setup, we use it for www.zope.de:
 
 [EMAIL PROTECTED] ~]$ cat /etc/logrotate.d/zope.de
 /home/zope/zope.de/log/*.log {
 weekly
 rotate 10
 missingok
 compress
 copytruncate
 }

Alright. Thank you for the configuration script.

J.

-- 
Julien Anguenot | Nuxeo RD (Paris, France)
Open Source ECM - www.nuxeo.com
CPS Platform - http://www.cps-project.org
Mobile: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Can logreopen restarts Zope ?

2006-06-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Julien Anguenot wrote:
 Jens Vagelpohl wrote:
 On 30 Jun 2006, at 13:40, Julien Anguenot wrote:
 Yesterday night, we were having a long nightly running process (several
 hours) on one of the ZEO node. (Around 500 Mo logs on this one). The
 reopen occurred while the Zope server was still working. The reopen went
 ok but it restarted the Zope server at the same time which of course
 stopped the actual running operation of ours.

 Did someone experienced this ?

 Any feedbacks appreciated.
 For maximum reliability I tend to forego the built-in log reopening in
 favor of using the logrotate utility in copytruncate mode. This will
 not require any log file reopening, logrotate will simply make a copy of
 the existing log and then truncate the logfile that continues to be in
 use to zero length. Zope or the ZEO server won't have to know or care at
 all at that point.
 
 Thank you Jens for the quick reply.
 
 I think I'm going to send these instructions, to be on the safe side, to
 the administrators taking care of the cluster.
 
 Do you have any idea about the zopectl logreopen misbehavior as
 someone who's avoiding using it explicitly ;) ?


I think the shift to the oh-so-much-better Python logging module is not
complete.  See this bit in ZEO/runzeo.py:

def handle_sigusr2(self):
# TODO: this used to reinitialize zLOG. How do I achieve
# the same effect with Python's logging package?
# Should we restart as with SIGHUP?
log(received SIGUSR2, but it was not handled!, \
 level=logging.WARNING)

svn blames Tim for the comment, and Gintautas for the actual logging
call change.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEpURZ+gerLs4ltQ4RArORAJ46/o7lrmH99qDR3O51qWyu7wCdXgCeO3Lc
KajVH3VK8oGsawX0xA7aoPg=
=gVUG
-END PGP SIGNATURE-

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


Re: [Zope-dev] Re: Can logreopen restarts Zope ?

2006-06-30 Thread Lennart Regebro

On 6/30/06, Tres Seaver [EMAIL PROTECTED] wrote:

I think the shift to the oh-so-much-better Python logging module is not
complete.  See this bit in ZEO/runzeo.py:


Aha. Indeed, we are running ZEO, and my failed attempts of reproducing
this did not use ZEO. :)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] the zope, eggs and the testrunner

2006-06-30 Thread whit
I've been developping some packages using zope.testing and the 
testrunner that ships with zope2.10.  Yesterday, I packaged these using 
fairly standard python/egg pattern.  one package is pure python, the 
other a zope2/zope3 hybrid.


now I have two large PITAs:

1. in general, this would suck alot less if easyinstall would recognize 
I already have package x, y, and z on my PYTHONPATH, rather than 
helpfully installing incompatible ones or erroring out when it can't 
resolve zope dependency x from the ether.


Doesn't seem to be a --stop-sucking flag that I can find.  removing all 
the zopeish things like zope.interface and zope.testing solves this 
problem for the pure python package (but sort of make things like 
testing interfaces out of the question).



2. zopectl test doesn't see my tests with said packages installed in 
develop mode or as eggs (assorted --path etc options don't seem to 
help).   Running the tests via python setup.py test only works when I 
unflag the testing dependency of zope.testing.


anyone been down this rabbit hole? have any suggestions? resources?

-w

--

 | david whit morriss
 |
 | contact :: http://public.xdi.org/=whit

 If you don't know where you are,
  you don't know anything at all

  Dr. Edgar Spencer, Ph.D., 1995


 I like to write code like
 other ppl like to tune their
 cars or 10kW hifi equipment...

 Christian Heimes, 2004

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope] attaching an image to an email

2006-06-30 Thread Berthold Stöger
On Friday 30 June 2006 07:47, Andreas Jung wrote:

 One should really take the *pain-free* way and use Python 'email' Modul to
 generate emails - at least when you want to deal with attachments in a
 reasonable way.

*shrug*
I've always found DTML to be more natural to generate emails than 
PythonScripts. I really don't see what the problem is with not adding 
whitespace where there should be no whitespace.

Now if only I could send links to attached pictures with dtml-sendmail...

cu...
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] zope and redhat

2006-06-30 Thread Felipe Pageo

Hi all, sorry for my english

I have installed zope 2.8.7, Python 2.3.5 on Linux redhat enterprise AS 
4 (2 cpu's and 2.6 kernel).  When start zope it starts only one thread. 
I have compiled python with flag with-thread, but all is the same.  
Pleas help me.


Thanks in advance.

--
Felipe Pageo Domínguez
Servicio de Informática y Comunicaciones
Universidad de Sevilla
Tel. 954554441



smime.p7s
Description: S/MIME Cryptographic Signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope and redhat

2006-06-30 Thread Andreas Jung



--On 30. Juni 2006 08:20:30 +0200 Felipe Pageo [EMAIL PROTECTED] wrote:


Hi all, sorry for my english

I have installed zope 2.8.7, Python 2.3.5 on Linux redhat enterprise AS 4
(2 cpu's and 2.6 kernel).



When start zope it starts only one thread.


When you start Python it will start *four* work threads by default. Check 
the thread configuration in etc/zope.conf.


-aj

pgp8HHkoQNFPA.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope and redhat

2006-06-30 Thread Andreas Jung



--On 30. Juni 2006 08:26:44 +0200 Andreas Jung [EMAIL PROTECTED] wrote:




--On 30. Juni 2006 08:20:30 +0200 Felipe Pageo [EMAIL PROTECTED] wrote:


Hi all, sorry for my english

I have installed zope 2.8.7, Python 2.3.5 on Linux redhat enterprise AS 4
(2 cpu's and 2.6 kernel).



When start zope it starts only one thread.


When you start Python it will start *four* work threads by default. Check
the thread configuration in etc/zope.conf.




And what makes you think that you have only one thread?

-aj


--
ZOPYX Ltd.  Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope  Plone development, Consulting


pgppMyrlDYnf7.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] dtml-sendmail html

2006-06-30 Thread Best
Is there a way to send a html formatted message using dtml-sendmail?dtml-sendmail mailhost=MailHostTo: [EMAIL PROTECTED]From: dtml-var mail
Subject: [GPME] ContactFullname: dtml-var surname dtml-var firstnameTitle: dtml-var ftitleMail: dtml-var mailDescription: dtml-var description
[HTML Mesage]/dtml-sendmail
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Acquisition? problem

2006-06-30 Thread Hans Then
Hi all,

I am writing a small object browser for the EPOZ toolbox. In the browser I
have a tree of object references. Clicking on the tree should show more
details of the selected object. I have created a template details that
should show the details of the object, like this:

/folder/selected_object/details

This is all TTW code by the way. The template works fine for most values of
selected_object, but for some it fails. It fails for at least PageTemplates
and Python Scripts. For those objects, calling the details template will
simply show the normal output of the object.

Any ideas on how to solve this?

Regards,

Hans Then

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: dtml-sendmail html

2006-06-30 Thread Best
problem solved :) thx dimitris dtml-sendmail mailhost=MailHostTo: [EMAIL PROTECTED]
From: dtml-var mail
Subject: [GPME] ContactContent-Type: text/html; charset=utf-8Content-Transfer-Encoding: 8bit..On 6/30/06, Best 
[EMAIL PROTECTED] wrote:Is there a way to send a html formatted message using dtml-sendmail?
dtml-sendmail mailhost=MailHostTo: [EMAIL PROTECTED]From: dtml-var mail
Subject: [GPME] ContactFullname: dtml-var surname dtml-var firstnameTitle: dtml-var ftitleMail: dtml-var mailDescription: dtml-var description

[HTML Mesage]/dtml-sendmail


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Acquisition? problem

2006-06-30 Thread Jonathan


- Original Message - 
From: Hans Then [EMAIL PROTECTED]

I am writing a small object browser for the EPOZ toolbox. In the browser I
have a tree of object references. Clicking on the tree should show more
details of the selected object. I have created a template details that
should show the details of the object, like this:

/folder/selected_object/details

This is all TTW code by the way. The template works fine for most values 
of
selected_object, but for some it fails. It fails for at least 
PageTemplates

and Python Scripts. For those objects, calling the details template will
simply show the normal output of the object.


if you have a python script in the middle of your path, eg:

folder/pythonscript/somethingelse

then the pythonscript routine will get executed and 'somethingelse' will be 
passed in a variable called 'traverse_subpath'


Create a test python script and try it out (look for traverse_subpath in the 
REQUEST namespace)




Jonathan 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Acquisition? problem

2006-06-30 Thread Jonathan


- Original Message - 
From: Hans Then [EMAIL PROTECTED]

if you have a python script in the middle of your path, eg:
folder/pythonscript/somethingelse
then the pythonscript routine will get executed and 'somethingelse' will

be

passed in a variable called 'traverse_subpath'
Create a test python script and try it out (look for traverse_subpath in

the

REQUEST namespace)


What if I don't want that? I can, for instance, call
/folder/pythonscript/title_or_id
/folder/pythonscript/manage_workspace


If you want to be sure about the behaviour of your display template I would 
change the URL to something like:


folder/displayroutine?id=objectid

and have displayroutine (a script or method) access the object via the 
parameter id ad generate the appropriate display (based on the type of 
object it is given). This way you are not going to run into differences in 
aquisition handling for different types of objects that you are trying to 
display.



Jonathan 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope and redhat

2006-06-30 Thread Chris McDonough
I suspect you *think* it's starting one thread because top reports  
only one or two python processes.  This is normal for newer Red Hat  
systems.  Older ones reported a process for each thread.  I believe  
there is a flag to ps that shows all threads as processes.


- C

On Jun 30, 2006, at 2:20 AM, Felipe Pageo wrote:


Hi all, sorry for my english

I have installed zope 2.8.7, Python 2.3.5 on Linux redhat  
enterprise AS 4 (2 cpu's and 2.6 kernel).  When start zope it  
starts only one thread. I have compiled python with flag with- 
thread, but all is the same.  Pleas help me.


Thanks in advance.

--
Felipe Pageo Domínguez
Servicio de Informática y Comunicaciones
Universidad de Sevilla
Tel. 954554441

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope and redhat

2006-06-30 Thread Jonathan


- Original Message - 
From: Chris McDonough [EMAIL PROTECTED]

To: Felipe Pageo [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Friday, June 30, 2006 1:56 PM
Subject: Re: [Zope] zope and redhat


I suspect you *think* it's starting one thread because top reports  
only one or two python processes.  This is normal for newer Red Hat  
systems.  Older ones reported a process for each thread.  I believe  
there is a flag to ps that shows all threads as processes.


ps -eLf




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: database conflict errors

2006-06-30 Thread Dieter Maurer
Florent Guillaume wrote at 2006-6-30 02:46 +0200:
 ...
 that's interesting. I did a test once to see what effect it would have 
 to add objects with a completely random id to a BTree folder (OOBTree in 
 that case) instead of using the object's type nam and add a number at 
 the end - and the result was the opposite in term of read performance. 
 Looking up keys was much faster if the ids followed a pattern like:
 
 - something-1
 - something-2
 ...

Sure, in single-threaded mode this will decrease performance because the 
keys are spread randomly among all the buckets so many more buckets get 
written.

But in multi-threaded mode, this very spreading leads to better conflict 
resolution behavior.

But still can reduced performance...

That's why the catalog uses the initial id randomly but then
assigns id's (within a single thread) sequentially.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )