Hi,

Thanks for the various advises previously. I have experimented with
different wsgi servers:

zope.server#main
Paste#http
PasteScript#cherrypy
PasteScript#twisted

and put them under some load: ab -c 20

The zope.server seems to give the best result. It causes the least
failed requests due to the Competing writes/reads conflict, like:

2008-03-11T22:56:16 WARNING ZopePublication Competing writes/reads at
/prod/++vh++http:rhodium.homemaster.cn:80/++/products/bWc9MTAxJmI9NA==:
database conflict error (oid 0x36, class BTrees.OOBTree.OOBTree,
serial this txn started with 0x03745ce92aee00aa 2008-03-11
08:09:10.061648, serial currently committed 0x03745e800ade9cdd
2008-03-11 14:56:02.547558)

With PasteScript#cherrypy my application fails when using JSON
requests with the header Content-Type: application/json. It causes
zope.publisher to throw a socket time out error and doesn't send back
any results. I guess it can not handle my request header properly. The
other servers are OK with the JSON request header.

2008-03-11T22:49:50 ERROR root
/root/workspace/eggs/tmp_f2rNS/zope.publisher-3.4.2-py2.5.egg/zope/publisher/publish.py
line 126 in publish
=> None
** <class 'socket.timeout'>: timed out
/root/workspace/eggs/z3c.jsonrpc-0.5.1-py2.5.egg/z3c/jsonrpc/publisher.py
line 114 in processInputs
=> 'incoming = stream.read(1000)'
** <class 'socket.timeout'>: timed out
/root/workspace/eggs/tmp_f2rNS/zope.publisher-3.4.2-py2.5.egg/zope/publisher/http.py
line 210 in read
=> None
** <class 'socket.timeout'>: timed out
/usr/lib/python2.5/socket.py line 309 in read
=> 'data = self._sock.recv(recv_size)'
** <class 'socket.timeout'>: timed out

I have one problem with zope.server though. It works fine with paste
in the 3.5 version. But following the advise of Christophe, I added
the following to my buildout.cfg

extends = http://download.zope.org/zope3.4/versions.cfg

It turns out however that zope.server-3.4.1 does not define
entry_points and therefore can not be loaded by Paste, since Paste
doesn't seem to be able to load from modules directly. How can I solve
this problem?

-- 
Hong Yuan

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

Reply via email to