[Zope-Checkins] SVN: zdaemon/trunk/ Bugs Fixed

2006-12-21 Thread Jim Fulton
Log message for revision 71643:
  Bugs Fixed
  --
  
  - In non-daemon mode, start hung, producing annoying dots
when the program exited.
  
  - The start command hung producing annoying dots if the deamon failed
to start.
  
  - foreground and start had different semantics because one used
os.system and another used os.spawn
  
  New Features
  
  
  - Documentation
  
  - Command-line arguments can now be supplied to the start and
foreground (fg) commands
  
  - zdctl now invokes itself to run zdrun.  This means that it's
no-longer necessary to generate a separate zdrun script.  This
especially when the magic techniques to find and run zdrun using
directory sniffing fail to set the path corrrectly.
  
  - The daemon mode is now enabled by default.  To get non-deamon mode,
you have to use a configuration file and set deamon to off
there. The old -d option is kept for backward compatibility, but is
a no-op.
  

Changed:
  U   zdaemon/trunk/CHANGES.txt
  A   zdaemon/trunk/src/zdaemon/README.txt
  U   zdaemon/trunk/src/zdaemon/component.xml
  A   zdaemon/trunk/src/zdaemon/tests/tests.py
  U   zdaemon/trunk/src/zdaemon/zdctl.py
  U   zdaemon/trunk/src/zdaemon/zdoptions.py

-=-
Modified: zdaemon/trunk/CHANGES.txt
===
--- zdaemon/trunk/CHANGES.txt   2006-12-21 17:27:38 UTC (rev 71642)
+++ zdaemon/trunk/CHANGES.txt   2006-12-21 23:46:14 UTC (rev 71643)
@@ -1,19 +1,88 @@
 zdaemon Changelog
-=
+*
 
+To-Dos
+==
+
+Tests:
+
+- non-daemon mode
+
+- no infinite loop when program fails on start
+
+More docs:
+
+- Document/demonstrate some important features, such as:
+
+  - transcript log
+
+  - working directory
+
+- Reference docs
+
+
+Features
+
+- environment variables
+
+- transcript log rotation
+
+Bugs 
+
+- help command
+
+
+zdaemon 2.0a1 (2006/12/21)
+==
+
+Bugs Fixed
+--
+
+- In non-daemon mode, start hung, producing annoying dots
+  when the program exited.
+
+- The start command hung producing annoying dots if the deamon failed
+  to start.
+
+- foreground and start had different semantics because one used
+  os.system and another used os.spawn
+
+New Features
+
+
+- Documentation
+
+- Command-line arguments can now be supplied to the start and
+  foreground (fg) commands
+
+- zdctl now invokes itself to run zdrun.  This means that it's
+  no-longer necessary to generate a separate zdrun script.  This
+  especially when the magic techniques to find and run zdrun using
+  directory sniffing fail to set the path corrrectly.
+
+- The daemon mode is now enabled by default.  To get non-deamon mode,
+  you have to use a configuration file and set deamon to off
+  there. The old -d option is kept for backward compatibility, but is
+  a no-op.
+
+zdaemon 1.4a1 (2005/11/21)
+==
+
+Fixed a bug in the distribution setup file.
+
 zdaemon 1.4a1 (2005/11/05)
---
+==
 
 First semi-formal release.
 
 After some unknown release(???)

+===
 
  - Made 'zdaemon.zdoptions' not fail for --help when __main__.__doc__
is None.
 
 After zdaemon 1.1
--
+=
 
  - Updated test 'testRunIgnoresParentSignals':
   
@@ -40,7 +109,7 @@
forceful warning.
 
 zdaemon 1.1 (2005/06/09)
-
+
 
  - SVN tag:  svn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1
 

Added: zdaemon/trunk/src/zdaemon/README.txt
===
--- zdaemon/trunk/src/zdaemon/README.txt2006-12-21 17:27:38 UTC (rev 
71642)
+++ zdaemon/trunk/src/zdaemon/README.txt2006-12-21 23:46:14 UTC (rev 
71643)
@@ -0,0 +1,139 @@
+Using zdaemon
+=
+
+zdaemon provides a script, zdaemon, that can be used to running other
+programs as POSIX (Unix) daemons. (Of course, it is only usable on
+POSIX-complient systems.
+
+Using zdaemon requires specifying a number of options, which can be
+given in a configuration file, or as command-line options.  It also
+accepts commands teling it what do do.  The commants are:
+
+start
+Start a process as a daemon
+
+stop
+Stop a running daemon process
+
+restart
+Stop and then restart a program
+
+status
+Find out if the program is running
+
+foreground or fg
+Run a program
+
+kill signal
+Send a signal to the daemon process
+
+help command
+Get help on a command
+
+
+Commands can be given on a command line, or can be given using an
+interactive interpreter.
+
+Let's start with a simple example.  We'll use command-line options to
+run the echo command:
+
+ system(./zdaemon -p 'echo hello world' fg)
+echo hello world
+hello world
+
+Here we used the -p option to specify a program to run.  We can
+specify a program name and 

[Zope-dev] Zope Tests: 7 OK

2006-12-21 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Wed Dec 20 12:00:00 2006 UTC to Thu Dec 21 12:00:00 2006 UTC.
There were 7 messages: 7 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2.6 Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Wed Dec 20 21:06:58 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006866.html

Subject: OK : Zope-2.6 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Wed Dec 20 21:08:28 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006867.html

Subject: OK : Zope-2.7 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Wed Dec 20 21:09:58 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006868.html

Subject: OK : Zope-2.8 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Wed Dec 20 21:11:28 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006869.html

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Wed Dec 20 21:12:59 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006870.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Wed Dec 20 21:14:29 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006871.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Wed Dec 20 21:15:59 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006872.html

___
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] Too many ZODB object loads...

2006-12-21 Thread Suresh V

On the database Activity tab in the Control Panel, I am seeing a high
number of Object Loads (400K per hour). My cache size if 60K from what I 
see in the Cache Parameters tab, each of the 4 threads is well within 
this limit. My database has about 1M objects.


The symptom is that Zope appears slow when adding/editing content.

Any idea if this is a problem?

Suresh

___
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] RFP: Zope/Plone Performance Audit

2006-12-21 Thread Marshall Mayer

Good morning/evening,

LiveModern (http://livemodern.com) is a fairly active and visible  
community-oriented Zope/Plone website that is experiencing  
performance problems after a migration from Plone 2.0.5 to Plone  
2.1.4. The site is functioning well after the migration, except for  
performance. But because Zope/Plone is such a complex system, we're  
having trouble finding the performance bottleneck that our visitors/ 
members consistently report (it's s slow).


From the end user perspective, most anonymous visitors do not see  
performance problems due to our caching scheme. When they hit a page  
that needs refreshing, it can be quite slow however. But where the  
problems really raise their ugly heads is for authenticated members  
(our members contribute all content on the site, so this is a BIG  
problem). Their experience is often very slow, sometimes for  
navigation but mostly for adding/editing content, making the site  
mostly unusable for our content providers. From an administrator's  
perspective, we can see that the CPUs seem to be always working  
overtime.


We're pretty sure we can fix the problem (it's probably a  
configuration solution), if we can just find what's holding the site  
up. We're confident Zope and Plone is up to the task for our site, if  
we can get Zope and Plone (and everything else we have installed to  
increase performance) set up right. We just need some fresh eyes to  
look at the problem, and know it will probably take a bit of your  
time inside our site to find it.


After you review our server setup below, we'd be interested in your  
analysis of our site, and your recommendations on how to increase  
performance. If you are interested in providing this service, please  
respond ASAP with a cost estimate and timeline for your services.  
Those that can complete the analysis and recommendations before  
January 1, 2007 will be given preference.


Marshall

LiveModern Hardware:
* Apple Xserve G5, dual 2.3 GHz PPC G5 processors
* 6BG RAM
* dual SCSI hard drives on RAID
* dedicated T1 connection

LiveModern Software:
* Mac OS X Server 10.4.8, all software updates applied
* Zope 2.8.7, Plone 2.1.4, Python 2.3.5 running behind Apache and Squid
* CacheFu 1.0.1 and ZEO installed
* Main Plone content products include Ploneboard 1.0 and SimpleBlog
* 1M objects in ZODB

LiveModern Traffic:
* 16K registered members
* 40K unique visitors/month and dropping rapidly (from 80K/month 3  
months ago)
* 200K page views/month and dropping rapidly (from 400K/month 3  
months ago)


___
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] how can I use the python set-type in pythonscripts ?

2006-12-21 Thread Dieter Maurer
joachim wrote at 2006-12-20 18:57 +0100:
I did a

allow_type(type(set))

This should be allow_type(set).

in the __init__ of my product. But when I use it in a Python script I
get global name 'set' is not defined.

Allowing a type does not automatically mean that it gets available
in the builtin namespace for untrusted code.

I would do the following:

   Define a module, say importable, which imports all 
   objects you want to make available to untrusted code.

   Declare this module importable via allow_module(importable).

   Provide (e.g. in the module) all allow_type you want.

   Import your resources in your untrusted code.

An example of this approach is Products.PythonScripts.standard).



-- 
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 )


Re: [Zope] problem using rdflib with zope profiler

2006-12-21 Thread Dieter Maurer
Lucie Lejard wrote at 2006-12-20 17:03 -0500:
I am using the default profiler of zope (in zmi/Control_Panel/DebugInfo) 
  to trace the calls when I go on a specific template.
This template is using a Five view that has methods using the rdflib. 
You will see below the error i have when I try to access the template 
using the zope profiler:


2006-12-20 14:08:46 ERROR Zope.SiteErrorLog 
http://localhost:51921/RosettaSite/archive/advanced-search.html
Traceback (innermost last):
 ...
AssertionError: ('Bad call', 
('/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/rdflib/BNode.py',
 
42, '__new__'), frame object at 0x4698e10, frame object at 
0x1a06410, frame object at 0x44c5810, frame object at 0x18ab010)

Does anyone has an idea why it is creating this error?

Almost surely, this is a Python 2.4 problem.

If possible, try with a Python 2.3 installation.


An alternative is to use ZopeProfiler

  http://www.dieter.handshake.de/pyprojects/zope

It should work with Python 2.4 as well.



-- 
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 )


Re: [Zope] Too many ZODB object loads...

2006-12-21 Thread Dieter Maurer
Suresh V wrote at 2006-12-21 22:09 +0530:
On the database Activity tab in the Control Panel, I am seeing a high
number of Object Loads (400K per hour). My cache size if 60K from what I 
see in the Cache Parameters tab, each of the 4 threads is well within 
this limit.

60 k is unusually large. Are you sure that this is not the
combined size of all caches (such that each cache has a capacity
of 15 k)?

When the ZODB reported that it has read some number of objects,
it is very likely that it did indeed.

 ...
The symptom is that Zope appears slow when adding/editing content.

Do you use text indexing? with ranking information?

The usual cosine (OKAPI) ranking requires a large amount of data.

When you perform modifications, usually the problem is not
the amount of objects read but the amount and size of
objects written. Use fsdump to determine the size of your
transactions.



-- 
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 )


[Zope] external method, not escaping and

2006-12-21 Thread Mihamina Rakotomandimby
Hi,
I have an external method that fetches some web content (POP messages)
then format an HTML output to make it easy to display.
the Id of the external method is mm. So as I said, it returns HTML
content, with HTML tags and s and s.
I directly call that external method from a ZPT this way:
div tal:content=python:here.mm() 
foo
/div
the problem is the  and  returned by mm are all transformed to
lt; and gt;. How to avoid that?

Thank you.

___
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] RFP: Zope/Plone Performance Audit

2006-12-21 Thread Dieter Maurer
Marshall Mayer wrote at 2006-12-21 08:35 -0800:
 ...
LiveModern (http://livemodern.com) is a fairly active and visible  
community-oriented Zope/Plone website that is experiencing  
performance problems after a migration from Plone 2.0.5 to Plone  
2.1.4. The site is functioning well after the migration, except for  
performance. But because Zope/Plone is such a complex system, we're  
having trouble finding the performance bottleneck that our visitors/ 
members consistently report (it's s slow).

Use some of the profilers to find out where the time is spent.

I usually use ZopeProfiler (because I developped it) but
PTProfiler can also help a lot.



-- 
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 )


Re: [Zope] external method, not escaping and

2006-12-21 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 21. Dezember 2006 20:32:39 +0100 Mihamina Rakotomandimby 
[EMAIL PROTECTED] wrote:

 Hi,
 I have an external method that fetches some web content (POP messages)
 then format an HTML output to make it easy to display.
 the Id of the external method is mm. So as I said, it returns HTML
 content, with HTML tags and s and s.
 I directly call that external method from a ZPT this way:
   div tal:content=python:here.mm()
   foo
   /div
 the problem is the  and  returned by mm are all transformed to
 lt; and gt;. How to avoid that?


Look at the 'structure' directive of ZPT *hint*

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

iD8DBQFFiuLZCJIWIbr9KYwRArATAJ9fW0UckZO5GFz30JWkddYv3h8GcwCfastX
kc/+w1d6DMHK7pVgS3b08SY=
=ojz9
-END 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] Re: Too many ZODB object loads...

2006-12-21 Thread Suresh V

Dieter Maurer wrote:

Suresh V wrote at 2006-12-21 22:09 +0530:

On the database Activity tab in the Control Panel, I am seeing a high
number of Object Loads (400K per hour). My cache size if 60K from what I 
see in the Cache Parameters tab, each of the 4 threads is well within 
this limit.


60 k is unusually large. Are you sure that this is not the
combined size of all caches (such that each cache has a capacity
of 15 k)?


We hiked it up to 60K per thread because we have lots of memory and 
wanted to make Zope perform better. Is there a disadvantage to this?




When the ZODB reported that it has read some number of objects,
it is very likely that it did indeed.


But even under very little site activity, it seems to be loading a lots 
of objects. Is this normal?





...
The symptom is that Zope appears slow when adding/editing content.


Do you use text indexing? with ranking information?

The usual cosine (OKAPI) ranking requires a large amount of data.



Nope.


When you perform modifications, usually the problem is not
the amount of objects read but the amount and size of
objects written. Use fsdump to determine the size of your
transactions.



I will check this.

Thanks for your pointers.

Suresh

___
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] problem with the shapelib module.. help

2006-12-21 Thread Allen Huang
I want to do some mapping application with zope.. but I have run into this 
problem over and over..

in Run Zope in Console
Exception exceptions.AttributeError:ShapeFile instance has no attribute 
'thisown' in ignored

in web browser
Site Error
An error was encountered while publishing this resource. 
Error Type: IOError
Error Value: new_ShapeFile failed


I change some setting to my runzope.bat because I want zope to use python2.4.4 
instead of the build 2.3.5 because I have install shapelib 
module(pyshapelib-0.3.win32-py2.4) which is the module I want to use for the 
import of my external methods. The runzope.bat looks like this:
@set PYTHON=C:\Python24\python.exe
@set ZOPE_HOME=C:\web\Zope\Zope
@set INSTANCE_HOME=C:\web\ZopeInstance
@set SOFTWARE_HOME=C:\web\Zope\Zope\lib\python
@set CONFIG_FILE=C:\web\ZopeInstance\etc\zope.conf
@set 
PYTHONPATH=C:\Python24\Lib;%INSTANCE_HOME%\lib\python;%SOFTWARE_HOME%;%PYTHONPATH%
@set ZOPE_RUN=%SOFTWARE_HOME%\Zope2\Startup\run.py
%PYTHON% %ZOPE_RUN% -C %CONFIG_FILE% %1 %2 %3 %4 %5 %6 %7

I made a very short python external method to test the shapelib module 

import shapelib, dbflib
def testShapeLib(self):
f1 = shapelib.ShapeFile('C:\\web\\ZopeInstance\\taipei.shp') 

but all I get out of it is the above two errors
anyone have any idea what i'm do wrong with my settings or my code? any thought?

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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 )