Re: [Zope3-Users] Buildout recipe for setting up a WSGI application for Zope 3 ?

2008-03-02 Thread Jim Fulton


On Feb 21, 2008, at 11:18 AM, Baiju M wrote:


- Jim Fulton [EMAIL PROTECTED] wrote:

On Feb 21, 2008, at 7:28 AM, Baiju M wrote:


Hi,
Is there any buildout recipe for setting up a WSGI application
for Zope 3 ?  I know zopeproject is an option, but I am looking
for a recipe which does something similar.



I'm working on one very slowly.  My recent efforts to clean up
zope.server are part of this effort. There's a good chance I'll have

something by the end of the weekend.

This will be a recipe, either similar to or an addition to
zc.zope3recipes that let's you define a past-deploy based application

with a zope3 application.  My primary goal is to make it easy to
select a publication component.


This is a great news.  I would love to see it in zc.zope3recipes  
package itself,

may be zc.zope3recipes:wsgiapp or something like that.



Here's an update.  The first step is to create sane PasteDeploy app  
factories. zope.paste tries very hard to fit in with the current  
byzantine system.  I appreciate the effort that went into this. :)


I decided to go back to basics, especially since my main goal is to  
make it easier for people to control the publication component used.   
I've created application factories for zope.publisher and  
zope.app.publisher.  I've released the zope.publisher version.  It is  
very bare-bones.  It is up to users to write a full publication object  
to go with it.


Here's a simple buildout that creates a paster script:

  [buildout]
  parts = paster

  [paster]
  recipe = zc.recipe.egg
  eggs = PasteScript
   zope.publisher
   zope.server
  interpreter = py

If you try this, you can create a very simple sample web server with  
the following config file;


  [app:main]
  use = egg:zope.publisher
  publication = egg:zope.publisher#sample

  [server:main]
  use = egg:zope.server
  host = 127.0.0.1
  port = 8080

Which you can run with:

  bin/paster serve --daemon config-file start

I'm working on an application factory for zope.app.publisher.  This  
will:


- Support the request-type selection framework in zope.app.publication.

- Provide a derivative of zope.publication.browser.BrowserPublication  
that provides a hook for specifying an application root,

  other than using ZODB.

- Provides optional support for loading ZCML before calling the  
publication factory.


I've got a few details to work out and I need to write some tests.   
Maybe I'll release this next weekend, or the weekend after.


After this, I'll be ready to add recipes to support it.

Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


AW: [Zope3-Users] Buildout recipe for setting up a WSGI applicationfor Zope 3 ?

2008-03-02 Thread Roger Ineichen
Hi Jim

 Betreff: Re: [Zope3-Users] Buildout recipe for setting up a 
 WSGI applicationfor Zope 3 ?

[...]

 - Provide a derivative of zope.publication.browser.BrowserPublication
 that provides a hook for specifying an application root,
other than using ZODB.

Does this mean we can't use our existing BrowserPage implementations
because they do not inherit this IBrowserPublication (derivat)?

 - Provides optional support for loading ZCML before calling 
 the publication factory.

cool

Regards
Roger Ineichen

 Jim
 
 --
 Jim Fulton
 Zope Corporation

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: AW: [Zope3-Users] Buildout recipe for setting up a WSGI applicationfor Zope 3 ?

2008-03-02 Thread Jim Fulton


On Mar 2, 2008, at 7:10 PM, Roger Ineichen wrote:

- Provide a derivative of zope.publication.browser.BrowserPublication
that provides a hook for specifying an application root,
  other than using ZODB.


Does this mean we can't use our existing BrowserPage implementations
because they do not inherit this IBrowserPublication (derivat)?


zope.publisher.browser.BrowserPage has nothing to do with  
zope.app.publication.browser.BrowserPublication.


Jim

--
Jim Fulton
Zope Corporation


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Stability problem of zope3

2008-03-02 Thread Yuan HOng
Hi,

I have jsut moved a production site from Zope2 to Zope3. I used
zopeproject to download the necessary eggs and started my site using
paste serve deploy.ini.

Under moderate traffic however, the site stops responding soon. I have
to regularily restart the server.

When the site stops responding, 'ps -Af | grep python2.5' shows
hundreds of process of paster running. And the process number
increases with time rapidly, like:

root 20230 18557  0 11:16 ?00:00:00 /usr/bin/python2.5
bin/paster serve deploy.ini
root 20231 18557  0 11:16 ?00:00:00 /usr/bin/python2.5
bin/paster serve deploy.ini
root 20237 18557  0 11:17 ?00:00:00 /usr/bin/python2.5
bin/paster serve deploy.ini
root 20248 18557  0 11:17 ?00:00:00 /usr/bin/python2.5
bin/paster serve deploy.ini
root 20249 18557  0 11:17 ?00:00:00 /usr/bin/python2.5
bin/paster serve deploy.ini
root 20250 18557  0 11:17 ?00:00:00 /usr/bin/python2.5
bin/paster serve deploy.ini
root 20251 18557  0 11:17 ?00:00:00 /usr/bin/python2.5
bin/paster serve deploy.ini
root 20252 18557  0 11:17 ?00:00:00 /usr/bin/python2.5
bin/paster serve deploy.ini
root 20284 18557  0 11:18 ?00:00:00 /usr/bin/python2.5
bin/paster serve deploy.ini

Looking into z3.log, I found lots of alarming error messages like:

2008-03-03T11:01:57 INFO paste.httpserver.ThreadPool No idle tasks,
and only 0 busy tasks; adding 5 more workers
--
2008-03-03T11:01:58 CRITICAL ZODB.DB DB.open() has 253 open
connections with a pool_size of 7
--
2008-03-03T11:01:58 CRITICAL ZODB.DB DB.open() has 254 open
connections with a pool_size of 7
--
2008-03-03T11:01:59 CRITICAL ZODB.DB DB.open() has 255 open
connections with a pool_size of 7
--
2008-03-03T11:01:59 CRITICAL ZODB.DB DB.open() has 256 open
connections with a pool_size of 7
--
2008-03-03T11:01:59 CRITICAL ZODB.DB DB.open() has 257 open
connections with a pool_size of 7
--
2008-03-03T11:02:35 INFO paste.httpserver.ThreadPool No idle tasks,
and only 0 busy tasks; adding 5 more workers
--
2008-03-03T11:02:36 CRITICAL ZODB.DB DB.open() has 258 open
connections with a pool_size of 7
--

What's wrong with my installation?

For your information, the following related components are installed:

PasteDeploy-1.3.1
Paste-1.6
ZODB3-3.9.0_dev

I am running these with Python2.5. The site uses ZAlchemy to connect
to PostgreSQL database and uses ZODB for session variables.

-- 
Hong Yuan

大管家网上建材超市
装修装潢建材一站式购物
http://www.homemaster.cn
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users