[Zope] "error: release unlocked lock" with Zope/MySQL
[Reposted with a non-blank Subject field] We've been seeing this problem for some time. Earlier postings to the list were helpful in that we have eliminated possible causes, but the problem has never been resolved. Any assistance in tracking down the problem and fixing it would be greatly appreciated. Our configuration: Athlon dual processor machine RH7.3 Zope 2.7.6 with ZEO Python 2.4.1 (same problem occurs with Python 2.3.5) Mysql-Python 1.21.c3 ZMySQLDA 2.09b3 MySql-4.0.20 This is a fragment from the event log: 2005-06-07T16:06:42 ERROR(200) ZMySQLDA exception during _begin Traceback (most recent call last): File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 349, in _begin self.db.ping() OperationalError: (2013, 'Lost connection to MySQL server during query') -- 2005-06-07T16:06:42 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. The application will not be allowed to commit until the site/storage is reset by a restart. Traceback (most recent call last): File "/usr/local/src/zope/Zope2.7/lib/python/ZODB/Transaction.py", line 377, in _finish_many jar.tpc_finish(self) File "/usr/local/src/zope/Zope2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 376, in _finish self._tlock.release() error: release unlocked lock -- 2005-06-07T16:06:42 ERROR(200) ZODB A storage error occured during object abort. This shouldn't happen. Traceback (most recent call last): File "/usr/local/src/zope/Zope2.7/lib/python/ZODB/Transaction.py", line 412, in _commit_error j.tpc_abort(self) # This should never fail File "/usr/local/src/zope/Zope2.7/lib/python/Shared/DC/ZRDB/TM.py", line 63, in abort try: self._abort() File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 389, in _abort self._tlock.release() error: release unlocked lock -- 2005-06-07T16:06:42 ERROR(200) SiteError http://dev.agilemind.com/logged_in Traceback (most recent call last): File "/usr/local/src/zope/Zope2.7/lib/python/ZPublisher/Publish.py", line 107, in publish transactions_manager.commit() File "/usr/local/src/zope/Zope2.7/l[safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.-- 2005-08-06T20:47:21 ERROR(200) ZMySQLDA exception during _begin Traceback (most recent call last): File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 349, in _begin self.db.ping() OperationalError: (2013, 'Lost connection to MySQL server during query') -- We get the "release unlocked lock" message occasionally, frequently but not always preceded by the connection lost message. Our my.cnf file for MySQL is [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock skip-innodb set-variable=max_connections=2048 set-variable=long_query_time=1 #log-bin=/var/log/mysql/epaul-bin #log-bin-index=/var/log/mysql/epaul-bin.index #log-slow-queries=/var/log/mysql/epaul-slow.log # change timeouts to close rather than wait # interactive == 1 hour, programs == 5 mins set-variable=interactive_timeout=3600 set-variable=wait_timeout=300 # uncomment to not log connection problems #set-variable=log-warnings=off [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid We use MyISAM tables and the MySQL autocommit mode rather than handling locks and transactions explicitly. >From a user perspective, refreshing the Zope page recovers from the error and allows one to continue working. ___ 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 )
[Zope] (no subject)
We've been seeing this problem for some time. Earlier postings to the list were helpful in that we have eliminated possible causes, but the problem has never been resolved. Any assistance in tracking down the problem and fixing it would be greatly appreciated. Our configuration: Athlon dual processor machine RH7.3 Zope 2.7.6 with ZEO Python 2.4.1 (same problem occurs with Python 2.3.5) Mysql-Python 1.21.c3 ZMySQLDA 2.09b3 MySql-4.0.20 This is a fragment from the event log: 2005-06-07T16:06:42 ERROR(200) ZMySQLDA exception during _begin Traceback (most recent call last): File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 349, in _begin self.db.ping() OperationalError: (2013, 'Lost connection to MySQL server during query') -- 2005-06-07T16:06:42 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. The application will not be allowed to commit until the site/storage is reset by a restart. Traceback (most recent call last): File "/usr/local/src/zope/Zope2.7/lib/python/ZODB/Transaction.py", line 377, in _finish_many jar.tpc_finish(self) File "/usr/local/src/zope/Zope2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 376, in _finish self._tlock.release() error: release unlocked lock -- 2005-06-07T16:06:42 ERROR(200) ZODB A storage error occured during object abort. This shouldn't happen. Traceback (most recent call last): File "/usr/local/src/zope/Zope2.7/lib/python/ZODB/Transaction.py", line 412, in _commit_error j.tpc_abort(self) # This should never fail File "/usr/local/src/zope/Zope2.7/lib/python/Shared/DC/ZRDB/TM.py", line 63, in abort try: self._abort() File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 389, in _abort self._tlock.release() error: release unlocked lock -- 2005-06-07T16:06:42 ERROR(200) SiteError http://dev.agilemind.com/logged_in Traceback (most recent call last): File "/usr/local/src/zope/Zope2.7/lib/python/ZPublisher/Publish.py", line 107, in publish transactions_manager.commit() File "/usr/local/src/zope/Zope2.7/l[safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.-- 2005-08-06T20:47:21 ERROR(200) ZMySQLDA exception during _begin Traceback (most recent call last): File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 349, in _begin self.db.ping() OperationalError: (2013, 'Lost connection to MySQL server during query') -- We get the "release unlocked lock" message occasionally, frequently but not always preceded by the connection lost message. Our my.cnf file for MySQL is [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock skip-innodb set-variable=max_connections=2048 set-variable=long_query_time=1 #log-bin=/var/log/mysql/epaul-bin #log-bin-index=/var/log/mysql/epaul-bin.index #log-slow-queries=/var/log/mysql/epaul-slow.log # change timeouts to close rather than wait # interactive == 1 hour, programs == 5 mins set-variable=interactive_timeout=3600 set-variable=wait_timeout=300 # uncomment to not log connection problems #set-variable=log-warnings=off [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid We use MyISAM tables and the MySQL autocommit mode rather than handling locks and transactions explicitly. >From a user perspective, refreshing the Zope page recovers from the error and allows one to continue working. ___ 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] Is there a windows version of zope 2.8.1b1?
--On 7. August 2005 12:33:12 +0800 Litao Wei <[EMAIL PROTECTED]> wrote: Oh, Bad news. When will the windows version release? Or would you give me some tip on how to build zope on windows? Everything is the work of volunteers and things will be done as they are done. Otherwise you have to wait until Christian has time to work on the windows build. -aj pgpTcrsiYQcvX.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] Is there a windows version of zope 2.8.1b1?
Oh, Bad news. When will the windows version release? Or would you give me some tip on how to build zope on windows? Thank you. On 8/7/05, Andreas Jung <[EMAIL PROTECTED]> wrote: > > > --On 7. August 2005 04:03:41 +0800 Litao Wei <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > > I want to try the new feature of zope 2.8.1, but zope.org only > > contains the source version. where I can get a windows version? > > No, Christian Theune was not available over the last days so I assume he > had no time to build a Windows version. > > -aj > > ___ 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] Is there a windows version of zope 2.8.1b1?
--On 7. August 2005 04:03:41 +0800 Litao Wei <[EMAIL PROTECTED]> wrote: Hi all, I want to try the new feature of zope 2.8.1, but zope.org only contains the source version. where I can get a windows version? No, Christian Theune was not available over the last days so I assume he had no time to build a Windows version. -aj pgprhQuOxCyjv.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] Pluggable Brains
Hi Zope, I've been using "pluggable brains" in some zSQL classes. I have some questions! a) It seems if I initialize a variable in the __init__ method that variable, say self.callCount = 1 is not retained across calls, eg #python mod res = context.sql.brainySQL() for rec in res: rec.getCallCount() # where getCallCount is a method inside the Brains class and it just returns the var defined in __init__. But I get an attribute error instead. b) Can anyone direct me to a good faq on using these things? c) Has anyone experience with Pluggable Brains and zSQL? I am especially interest in performance issues because I intend to use Pluggable Brains to do *alot* of calculations - but only if the upside beats the downside of using them. d) Will Zope 3 support Pluggable Brains? Thanks, David ___ 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] Is there a windows version of zope 2.8.1b1?
Hi all, I want to try the new feature of zope 2.8.1, but zope.org only contains the source version. where I can get a windows version? ___ 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: MVC Approach
Thomas Adams wrote: > Hi all, > > I'm a newbie to Zope, using version 2.7.3 (okay it is not the newest one) > and I want to know if there is something > like a MVC approach available for Zope, i.e. Model-View-Controller > approach, as it is for instance in Java with the Struts framework from > Apache. > ... > > P.S: I don't know Zope 3 (Is that apossible answer of my questions?) Yes, Zope 3 has a MVC-like architecture. We call it the Component Architecture. It lets you separate responsibilities into different components (objects), e.g. content objects (they can be persistent, for example, or come from an RDBMS), views (e.g. browser views that produce HTML), adapters (enhance components with functionality), and utilities. For a structured introduction, see http://dev.zope.org/Zope3/ProgrammerTutorial or http://worldcookery.com. It is also possible to use Zope 3 style components in Zope 2 already, by using the Five product: http://codespeak.net/z3/five/. However, if you don't have any Zope 2 legacy, I can only recommend you start with Zope 3 from the beginning. Best regards, Philipp ___ 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] Large file support
--On 6. August 2005 09:30:05 +0100 Pascal Peregrina <[EMAIL PROTECTED]> wrote: Hi, I would like to know the steps to achieve (compilation flags, etc) in order to enable >2G ZODB file support. LFS is enabled in Python 2.3 by default. -aj pgpjFGIUI9mny.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] Large file support
Hi, I would like to know the steps to achieve (compilation flags, etc) in order to enable >2G ZODB file support. I use Zope 2.8.0 and python 2.3.5 on linux 2.4 (about to migrate to linux 2.6) Thanks Pascal ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.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 )
Re: [Zope] Zope 2.8 and conflict errors
> Not correct. _p_resolveConflict is used in Zope 2.8.x (and in Zope 3) exactly the same way it was used in 2.7.x. If it's not working, there may be a new bug in 2.8.x, but there's been report of that yet. Because of errors like: ConflictError: database conflict error (oid 0x0299de, class Products.DCOracle2.DA.Procedure, serial this txn started with 0x035f0726c7bfca88 2005-08-01 08:38:46.816215, serial currently committed 0x035f072fed78ebee 2005-08-01 08:47:55.657582) and according to: http://www.upfrontsystems.co.za/Members/jean/conflicterrors-explained I've added: def _p_resolveConflict(self, old, saved, new): print 'old:', old print 'saved:', saved print 'new:', new return new to SP.py into procedure class (DA.Procedure extends this), I've started Zope with runzope and there are no 'old':?, 'new':?, 'saved:?' statements at all on the console although other print statements from SP.Procedure are visible. Maybe these conflict errors I'm dealing with are different kind and are not falling into the correct piece of code or maybe this kind of test (print 'something') is too stupid to see if _p_resolveConflict is executed? -- Maciej Wisniowski ___ 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] Data.fs Windows to Linux?
Marc Schnapp wrote: I thought that I would back up my data.fs by copyting the entire Linux /var directory to a Windows machine with spare disk space and then creating a ZIP file on the Windows machine. There was a problem on the Linux machine, so I figured there'd be no problem by simply copying the data.fs (via a Samba share) back from Windows -> Linux. It seems that when Zope starts back up, it keeps attempting to deal with the "alien" database and then shuts down. The Same Database File Works Perfectly With A Windows Plone/Zope Installation - I installed a Windows version of Plone (with Zope of course) and that same data.fs file works just fine in the Windows environment. Questions: 1) Am I without hope of ever running the database under Linux again? 2) What is the reason that the database goes from Linux -> Windows OK but not in the other direction? 3) MOST IMPORTANT: Is there a technique I can use to tweak the database file or recover it so that it is Linux-friendly? ___ 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 ) we did this (albeit with late 2.6 / early 2.7 versions) often and had no problems. If you are using a cmf based product (like plone) you must check if the skin path stored in the portal skins are still ok. In "my time" they where stored as an absolute path wit C:\ and /home/zope.. on windows/linux which had to be fixed (there is a script on zope labs which can do that for you). But maybe this is not necessary anymore. Robert ___ 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 )