A database transaction in eZ publish failed.

Author Message

Nathalie Grimaud

Monday 16 January 2006 4:58:12 am

As I try to create a new object, I've got a <i>Fatal error : a database transaction in eZ publish failed.</i>
What can I do ?

Here's the SQL debug output (when I create a new Article):
**************
Notice: eZMySQLDB::query(0.000 ms) query number per page:0 Jan 16 2006 13:45:49

SET NAMES 'utf8'

Notice: eZMySQLDB::query(1 rows, 1.132 ms) query number per page:1 Jan 16 2006 13:45:49

SELECT data, user_id, expiration_time FROM ezsession WHERE session_key='37b8f90a67fe17b3156f55d55115749f'

Notice: eZMySQLDB::query(0 rows, 0.396 ms) query number per page:2 Jan 16 2006 13:45:49

SELECT contentobject_id, login, email, password_hash, password_hash_type
FROM ezuser
WHERE contentobject_id='0'

Notice: eZMySQLDB::query(0 rows, 0.384 ms) query number per page:3 Jan 16 2006 13:45:49

SELECT contentobject_id, login, email, password_hash, password_hash_type
FROM ezuser
WHERE contentobject_id='0'

Notice: eZMySQLDB::query(0 rows, 0.386 ms) query number per page:4 Jan 16 2006 13:45:49

SELECT destination_url, forward_to_id
FROM ezurlalias
WHERE source_md5 = '82041904e1c208071fc6cc8881e70ef5' AND
is_wildcard = 0
ORDER BY forward_to_id ASC, is_internal ASC
LIMIT 0, 1

Timing: Jan 16 2006 13:45:49

Module start 'content'

Notice: eZMySQLDB::query(1 rows, 1.783 ms) query number per page:5 Jan 16 2006 13:45:49

SELECT ezcontentobject.*,
ezcontentobject_tree.*,
ezcontentclass.name as class_name,
ezcontentclass.identifier as class_identifier
, ezcontentobject_name.name as name, ezcontentobject_name.real_translation
FROM ezcontentobject_tree,
ezcontentobject,
ezcontentclass
, ezcontentobject_name
WHERE node_id IN ( 265 ) AND
ezcontentobject_tree.contentobject_id=ezcontentobject.id AND
ezcontentclass.version=0 AND
ezcontentclass.id = ezcontentobject.contentclass_id
and ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
ezcontentobject_name.content_translation = 'eng-GB'

Notice: eZMySQLDB::query(1 rows, 0.435 ms) query number per page:5 Jan 16 2006 13:45:49

SELECT id, version, name, identifier, contentobject_name, creator_id, modifier_id,
created, remote_id, modified, is_container
FROM ezcontentclass
WHERE id='2' AND version='0'
ORDER BY version ASC
LIMIT 0, 2

Notice: eZMySQLDB::query(0 rows, 0.293 ms) query number per page:6 Jan 16 2006 13:45:49

BEGIN WORK

Notice: eZMySQLDB::query(7 rows, 0.576 ms) query number per page:7 Jan 16 2006 13:45:49

SELECT id, name, version, contentclass_id, identifier, placement, is_searchable,
is_required, can_translate, is_information_collector, data_type_string, data_int1, data_int2, data_int3,
data_int4, data_float1, data_float2, data_float3, data_float4, data_text1, data_text2,
data_text3, data_text4, data_text5
FROM ezcontentclass_attribute
WHERE contentclass_id='2' AND version='0'
ORDER BY placement ASC

Notice: eZMySQLDB::query(1 rows, 0.931 ms) query number per page:8 Jan 16 2006 13:45:49

INSERT INTO ezcontentobject (section_id, owner_id, contentclass_id, name, is_published, published, modified, current_version, status, remote_id) VALUES('1', '14', '2', 'New Article', '0', '0', '0', '1', '0', 'dbaf5e932b5ec75a44771929e5291564')

Notice: eZMySQLDB::query(4 rows, 0.443 ms) query number per page:9 Jan 16 2006 13:45:49

SELECT id, name, locale
FROM ezcontent_translation
ORDER BY id ASC

Notice: eZMySQLDB::query(0 rows, 1.022 ms) query number per page:10 Jan 16 2006 13:45:49

select * from ezcontentobject_name where contentobject_id = 482 and content_version = 1

Notice: eZMySQLDB::query(0 rows, 0.725 ms) query number per page:11 Jan 16 2006 13:45:49

delete from ezcontentobject_name where contentobject_id = 482 and content_version = 1 and content_translation ='eng-GB'

Notice: eZMySQLDB::query(-1 rows, 51,636.502 ms) query number per page:12 Jan 16 2006 13:45:49

insert into ezcontentobject_name( contentobject_id,name,content_version,content_translation,real_translation )
values( 482,
'New Article',
1,
'eng-GB',
'eng-GB' )

Error: eZMySQLDB Jan 16 2006 13:45:49

Query error: Lock wait timeout exceeded; try restarting transaction. Query: insert into ezcontentobject_name( contentobject_id,name,content_version,content_translation,real_translation )
values( 482,
'New Article',
1,
'eng-GB',
'eng-GB' )

Notice: eZMySQLDB::query(0 rows, 0.287 ms) query number per page:13 Jan 16 2006 13:45:49

UNLOCK TABLES

Error: eZDBInterface::commit TRANSID-008f89961b7c8e06c0534aa83e1456fb Jan 16 2006 13:45:49

Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-008f89961b7c8e06c0534aa83e1456fb.

Notice: eZMySQLDB::query(0 rows, 0.276 ms) query number per page:14 Jan 16 2006 13:45:49

ROLLBACK
**************

Ɓukasz Serwatka

Monday 16 January 2006 5:17:06 am

Hi Nathalie,

Are you sure that only eZ publish db user accessing database in the same time? Do you use cluster solutions?

You have this error because of:

1. Operation has entered a lock queue
2. Operation could be heavily overloaded

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Nathalie Grimaud

Monday 16 January 2006 5:38:59 am

Hi Lukasz,

I am the only ezpublish db user that acess to the ez database.
In the same mysql instance we have another database used by others users.

By the way, I'm the only developper who works on the ez database instance and the site is not opened to public.

Regarding your remarks, wich solution do you propose ?

The only possiblity we've found is restart Apache and Mysql but this pb occured twice in three hours so it's not satisfying.

Nathalie Grimaud

Wednesday 18 January 2006 1:07:25 am

New informations about our problem :

A - We have created a new class with three attributes
2 text line
1 object relations

B - we have created an object based on it and all worked fine.

C - We have modified the class adding attributes
2 XML blocks
1 text line

now the class is composed by
3 text line
1 object relations
2 XML blocks

D - we have created a new object based on this new version.
when we clicked on "add objects" for the object relations attribute, Apache crashed

E - we put the XML editor disabled
the edition of the object worked fine again.

Could someone try to explain us why we have to disable the XML editor to add a new object relation ?
Did someone already have this type of problem ?
As our client have paid for the XML editor, the solution that disable it is not satisfying.

PS : this problem occured 80% of trying.
That mean that for the other 20% Apache doesn't crash

PS2: please note that on WINDOWS OS, when the pb occures there is an Apache error window that propose us to send the error repport to Microsoft.
If we click on "don't send", eZpublish continues its work normaly.
On Unix this window doesn't appear so eZpublish is not able to continue its work, staying in an infinite loop.

Jason Senich

Wednesday 26 April 2006 2:50:19 pm

I am running into the same issue with creating different content objects. The problems disappears for a little while after restarting mysql but then the problem returns. Does anybody know what could be causing this or how to fix. My SQL output is below:

--------------------------
Timing: Apr 26 2006 17:32:32

Module start 'content'

Notice: eZMySQLDB::query(1 rows, 1.386 ms) query number per page:3 Apr 26 2006 17:32:32

SELECT ezcontentobject.*,
ezcontentobject_tree.*,
ezcontentclass.name as class_name,
ezcontentclass.identifier as class_identifier
, ezcontentobject_name.name as name, ezcontentobject_name.real_translation
FROM ezcontentobject_tree,
ezcontentobject,
ezcontentclass
, ezcontentobject_name
WHERE node_id IN ( 42920 ) AND
ezcontentobject_tree.contentobject_id=ezcontentobject.id AND
ezcontentclass.version=0 AND
ezcontentclass.id = ezcontentobject.contentclass_id
and ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
ezcontentobject_name.content_translation = 'eng-US'

Notice: eZMySQLDB::query(1 rows, 0.565 ms) query number per page:3 Apr 26 2006 17:32:32

SELECT id, version, name, identifier, contentobject_name, creator_id, modifier_id,
created, remote_id, modified, is_container
FROM ezcontentclass
WHERE id='20' AND version='0'
ORDER BY version ASC
LIMIT 0, 2

Notice: eZMySQLDB::query(0 rows, 0.209 ms) query number per page:4 Apr 26 2006 17:32:32

BEGIN WORK

Notice: eZMySQLDB::query(7 rows, 0.797 ms) query number per page:5 Apr 26 2006 17:32:32

SELECT id, name, version, contentclass_id, identifier, placement, is_searchable,
is_required, can_translate, is_information_collector, data_type_string, data_int1, data_int2, data_int3,
data_int4, data_float1, data_float2, data_float3, data_float4, data_text1, data_text2,
data_text3, data_text4, data_text5
FROM ezcontentclass_attribute
WHERE contentclass_id='20' AND version='0'
ORDER BY placement ASC

Notice: eZMySQLDB::query(1 rows, 0.476 ms) query number per page:6 Apr 26 2006 17:32:32

INSERT INTO ezcontentobject (section_id, owner_id, contentclass_id, name, is_published, published, modified, current_version, status, remote_id) VALUES('6', '10', '20', 'New Comment (IHE)', '0', '0', '0', '1', '0', '6bbbc2e2d94d3413a13e08ba89748d2c')

Notice: eZMySQLDB::query(1 rows, 0.406 ms) query number per page:7 Apr 26 2006 17:32:32

SELECT id, name, locale
FROM ezcontent_translation
ORDER BY id ASC

Notice: eZMySQLDB::query(0 rows, 0.388 ms) query number per page:8 Apr 26 2006 17:32:32

DELETE FROM ezcontentobject_name WHERE contentobject_id = 56074 and content_version = 1 and content_translation ='eng-US'

Notice: eZMySQLDB::query(-1 rows, 120,353.104 ms) query number per page:9 Apr 26 2006 17:32:32

INSERT INTO ezcontentobject_name( contentobject_id,
name,
content_version,
content_translation,
real_translation )
VALUES( '56074',
'New Comment (IHE)',
'1',
'eng-US',
'eng-US' )

Error: eZMySQLDB Apr 26 2006 17:32:32

Query error: Lock wait timeout exceeded; try restarting transaction. Query: INSERT INTO ezcontentobject_name( contentobject_id,
name,
content_version,
content_translation,
real_translation )
VALUES( '56074',
'New Comment (IHE)',
'1',
'eng-US',
'eng-US' )

Notice: eZMySQLDB::query(0 rows, 0.258 ms) query number per page:10 Apr 26 2006 17:32:32

UNLOCK TABLES

Error: eZDBInterface::commit TRANSID-2d2b9233df4becb807fb5b289b0cdd30 Apr 26 2006 17:32:32

Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-2d2b9233df4becb807fb5b289b0cdd30.

Notice: eZMySQLDB::query(0 rows, 0.267 ms) query number per page:11 Apr 26 2006 17:32:32

ROLLBACK

------------------

Nathalie Grimaud

Tuesday 02 May 2006 12:45:19 am

Hi Jason,

I don't know if this will help you but we actually resolved our problem upgrading the Online Editor from 3.0 to 4.0.2

Jason Senich

Tuesday 02 May 2006 7:03:48 am

I think our problem was with table locks in MySQL. The problem seemed to go away when we added innodb_table_locks=0 to our my.cnf.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.