osdir.com
mailing list archive

Subject: Re: ZEO and pidfiles - msg#00224

List: web.zope.zodb

Date: Prev Next Index Thread: Prev Next Index
Chris McDonough wrote:
There is a "start.py" in the ZEO directory which looks like it tries to
import the (ancient) zdaemon.Daemon package and writes a pid file and
all that jazz, but I'm not sure under what circumstance (if any) it's
supposed to be used.

It wouldn't be a good idea to depend on the start.py script, as it's been removed from the development tree.

If that's not used (there is also a "runzeo.py" script which is I think
is what zdctl calls), ZEO doesn't write a pidfile nor does
zeoctl/zdctl. ZEO should likely be responsible for writing a pidfile. This follows Zope's pattern and would allow rc script writers to do what
Alan says. It looks like runzeo already handles signals, so sending the
child process a signal should (ha ha) do the right thing.

I agree-- zdrun should support writing a pid file. The zdctl utility is useful, but not much help for incorporating ZEO into existing daemon frameworks.

-John


--
http:// if ile.org/

_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list - ZODB-Dev@xxxxxxxx
http://mail.zope.org/mailman/listinfo/zodb-dev



Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: ZEO and pidfiles

Ok. The ZEO/start.py looks like it's been seriously bitten by tabnanny circa line 276 where it's supposed to write the pidfile. This script does have that smell of cruft needing the old cvs remove ... I've attached a patch to runzeo.py to write a pidfile to ZEO_SERVER_PID if it's defined as I believe this is consistent with past behaviour for this process ... I can post a startup script for ZEO, but it's hardly rocketscience once there's access to a pid. Cheers, Alan Chris McDonough wrote: There is a "start.py" in the ZEO directory which looks like it tries to import the (ancient) zdaemon.Daemon package and writes a pid file and all that jazz, but I'm not sure under what circumstance (if any) it's supposed to be used. If that's not used (there is also a "runzeo.py" script which is I think is what zdctl calls), ZEO doesn't write a pidfile nor does zeoctl/zdctl. ZEO should likely be responsible for writing a pidfile. This follows Zope's pattern and would allow rc script writers to do what Alan says. It looks like runzeo already handles signals, so sending the child process a signal should (ha ha) do the right thing. - C On Tue, 2004-01-27 at 20:05, Alan Milligan wrote: Hi, I've seen a posting on gmane suggesting that one must grop for a ZEO pid using zdctl. Is this true? There seems to be some code in ZEO.utils.Environment which suggests setting ZEO_SERVER_PID will write to that file. This unfortunately doesn't work for me :( I'd really like to see a pid file - even a stale one. /etc/rc.d/init.d/functions provides a range of useful functions to deal with these contingencies when writing a startup script. TIA Alan _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@xxxxxxxx http://mail.zope.org/mailman/listinfo/zodb-dev --- runzeo.py 2004-01-28 14:07:58.000000000 +1100 +++ runzeo.py.old 2004-01-28 13:50:24.000000000 +1100 @@ -121,12 +121,6 @@ self.open_storages() self.setup_signals() self.create_server() - try: - f = open(os.getenv("ZEO_SERVER_PID"), 'w') - f.write("%s" % os.getpid()) - f.close() - except: - pass self.loop_forever() finally: self.close_storages() _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@xxxxxxxx http://mail.zope.org/mailman/listinfo/zodb-dev

Next Message by Date: click to view message preview

Re: cPickleCache: "Cache values may only be in onecache" error

--On Freitag, 23. Januar 2004 21:39 Uhr +0100 Andreas Jung <lists@xxxxxxxxxxxxxxxx> wrote: Dieter *may* have uncovered a good clue about that particular one here: http://mail.zope.org/pipermail/zope-dev/2003-December/021115.html It would sure be nice if people used the collectors <wink>. Is there any chance refresh involved in this case? It might be useful to disable it and see. I had enabled Refresh for this particular product (auto-refresh). Turning it off seems to have solved the problem...I'll keep an eye on it and complain again if the error should come back. Well, after disabling refresh for this particular I can see this problem again :-( In addition I see that the error is now raised sometimes in the Transience module: Time 2004/01/28 09:00:01.214 GMT+1 User Name (User Id) admin (admin) Request URL http://yetix:8080/plone/test/id_document_view Exception Type ValueError Exception Value Cache values may only be in one cache. Traceback (innermost last): * Module ZPublisher.Publish, line 104, in publish * Module Zope.App.startup, line 221, in commit * Module ZODB.Transaction, line 233, in commit * Module ZODB.Transaction, line 348, in _commit_objects * Module ZODB.Connection, line 425, in commit __traceback_info__: (('Products.Transience.Transience', 'Increaser'), '\x00\x00\x00\x00\x00\x00\x00\x0b', '') ValueError: Cache values may only be in one cache. and also again somewhere in the BTrees: 2004/01/28 09:01:42.094 GMT+1 User Name (User Id) admin (admin) Request URL http://yetix:8080/plone/test/id_document_view Exception Type ValueError Exception Value Cache values may only be in one cache. Traceback (innermost last): * Module ZPublisher.Publish, line 104, in publish * Module Zope.App.startup, line 221, in commit * Module ZODB.Transaction, line 233, in commit * Module ZODB.Transaction, line 348, in _commit_objects * Module ZODB.Connection, line 425, in commit __traceback_info__: (('BTrees.OOBTree', 'OOBTree'), '\x00\x00\x00\x00\x00\x00\x00(', '') ValueError: Cache values may only be in one cache. Since my setup is completely straight forward without any tricks and without false bottom this appears like a severe problem to me....but no idea how to resolve this. -aj _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@xxxxxxxx http://mail.zope.org/mailman/listinfo/zodb-dev

Previous Message by Thread: click to view message preview

Re: ZEO and pidfiles

Ok. The ZEO/start.py looks like it's been seriously bitten by tabnanny circa line 276 where it's supposed to write the pidfile. This script does have that smell of cruft needing the old cvs remove ... I've attached a patch to runzeo.py to write a pidfile to ZEO_SERVER_PID if it's defined as I believe this is consistent with past behaviour for this process ... I can post a startup script for ZEO, but it's hardly rocketscience once there's access to a pid. Cheers, Alan Chris McDonough wrote: There is a "start.py" in the ZEO directory which looks like it tries to import the (ancient) zdaemon.Daemon package and writes a pid file and all that jazz, but I'm not sure under what circumstance (if any) it's supposed to be used. If that's not used (there is also a "runzeo.py" script which is I think is what zdctl calls), ZEO doesn't write a pidfile nor does zeoctl/zdctl. ZEO should likely be responsible for writing a pidfile. This follows Zope's pattern and would allow rc script writers to do what Alan says. It looks like runzeo already handles signals, so sending the child process a signal should (ha ha) do the right thing. - C On Tue, 2004-01-27 at 20:05, Alan Milligan wrote: Hi, I've seen a posting on gmane suggesting that one must grop for a ZEO pid using zdctl. Is this true? There seems to be some code in ZEO.utils.Environment which suggests setting ZEO_SERVER_PID will write to that file. This unfortunately doesn't work for me :( I'd really like to see a pid file - even a stale one. /etc/rc.d/init.d/functions provides a range of useful functions to deal with these contingencies when writing a startup script. TIA Alan _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@xxxxxxxx http://mail.zope.org/mailman/listinfo/zodb-dev --- runzeo.py 2004-01-28 14:07:58.000000000 +1100 +++ runzeo.py.old 2004-01-28 13:50:24.000000000 +1100 @@ -121,12 +121,6 @@ self.open_storages() self.setup_signals() self.create_server() - try: - f = open(os.getenv("ZEO_SERVER_PID"), 'w') - f.write("%s" % os.getpid()) - f.close() - except: - pass self.loop_forever() finally: self.close_storages() _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@xxxxxxxx http://mail.zope.org/mailman/listinfo/zodb-dev

Next Message by Thread: click to view message preview

Scalable Container for Log-Entries

Hi! How would you code a scalable container which holds log-entries ordered by the time the data was inserted into the container. There are several process which add log-entries (ZEO + Filestorage). The API is very simple: 1. logContainer.add(data) 2. data_list=logContainer.get(from_date, to_date) I think of a BTree with the time as key. The time in seconds since 1970 is not enough because there will be several log entries per second. If you have an other solution, please let me know. I think a IOBTree would be good. But can a IOBTree handle long integers? I think these keys would be possible: t=time.time() t2=time.time() print long(t *10000000) print long(t2*10000000) --> 10752829557540122 --> 10752829557540250 Any hints welcome, Thomas _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@xxxxxxxx http://mail.zope.org/mailman/listinfo/zodb-dev
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by