INSERT INTO ezsession cause timeout and crash

Author Message

laurent le cadet

Tuesday 22 July 2008 9:42:08 am

Hi,

I have a real problem with a site.
There was more than 1000 anonymous user inline at the same time.
The site crash.

error.log says :

[ Jul 22 2008 17:25:21 ] [82.245.188.40] eZMySQLDB:
Query error: Lock wait timeout exceeded; Try restarting transaction. Query: INSERT INTO ezsession
                    ( session_key, expiration_time, data, user_id )
                    VALUES ( '03ff8b9f6d016394bc9c1c34097f4097', '1216999243', 'eZUserLoggedInID|i:10;eZUserInfoCache_Timestamp|i:1216739730;eZUserInfoCache|a:1:{i:10;a:5:{s:16:\"contentobject_id\";s:2:\"10\";s:5:\"login\";s:9:\"anonymous\";s:5:\"email\";s:12:\"nospam@ez.no\";s:13:\"password_hash\";s:32:\"4e6f6184135228ccd45f8233d72a0363\";s:18:\"password_hash_type\";s:1:\"2\";}}AccessArray|a:3:{s:7:\"content\";a:2:{s:4:\"read\";a:2:{s:6:\"p_1387\";a:1:{s:7:\"Section\";a:12:{i:0;s:1:\"1\";i:1;s:2:\"12\";i:2;s:2:\"25\";i:3;s:2:\"32\";i:4;s:2:\"44\";i:5;s:2:\"45\";i:6;s:2:\"47\";i:7;s:2:\"48\";i:8;s:2:\"49\";i:9;s:2:\"50\";i:10;s:2:\"51\";i:11;s:1:\"8\";}}s:6:\"p_1389\";a:2:{s:5:\"Class\";a:2:{i:0;s:2:\"26\";i:1;s:1:\"5\";}s:7:\"Section\";a:1:{i:0;s:1:\"3\";}}}s:10:\"tipafriend\";a:1:{s:1:\"*\";s:1:\"*\";}}s:4:\"user\";a:1:{s:5:\"login\";a:1:{s:6:\"p_1388\";a:1:{s:10:\"SiteAccess\";a:1:{i:0;s:10:\"3430272718\";}}}}s:3:\"rss\";a:1:{s:4:\"feed\";a:1:{s:1:\"*\";s:1:\"*\";}}}AccessArrayTimestamp|i:1216739730;eZRoleLimitationValueList_Timestamp|i:1216739730;eZUserGroupsCache_Timestamp|i:1216739730;eZUserGroupsCache|a:2:{i:0;s:2:\"42\";i:1;s:1:\"4\";}eZRoleLimitationValueList|a:1:{i:0;s:0:\"\";}eZRoleIDList_Timestamp|i:1216739730;eZRoleIDList|a:1:{i:0;s:1:\"1\";}eZUserDiscountRulesTimestamp|i:1216739730;eZUserDiscountRules10|a:0:{}eZGlobalSection|a:1:{s:2:\"id\";s:1:\"1\";}LastAccessesURI|s:34:\"/culture/genealogie/nom_de_famille\";LastAccessedModifyingURI|s:34:\"/culture/genealogie/nom_de_famille\";', '10' )

I looked at the anonymous user account and I saw that this user can support 1000 connection at the same time.

The problem comas from that ?

I need assistance :)

Best regards.

Laurent

Any idea?

Stéphane Couzinier

Monday 11 August 2008 2:15:05 pm

hi

reduce session timeout. maybe it will reduce the number of line in the table
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/configuration_files/site_ini/session

During this pb did you had a lot of traffic in your web site?
Maybe your have something to check in your Mysql conf.
http://ez.no/developer/articles/tuning_mysql_for_ez_publish/mysql_configuration

http://www.kouz-cooking.fr

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

eZ debug

Timing: Jan 18 2025 18:18:56
Script start
Timing: Jan 18 2025 18:18:56
Module start 'layout'
Timing: Jan 18 2025 18:18:56
Module start 'content'
Timing: Jan 18 2025 18:18:57
Module end 'content'
Timing: Jan 18 2025 18:18:57
Script end

Main resources:

Total runtime0.6444 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.2969152.6563
Module start 'layout' 0.00530.0027 741.953139.5078
Module start 'content' 0.00810.6352 781.4609529.5313
Module end 'content' 0.64330.0011 1,310.992212.1094
Script end 0.6444  1,323.1016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5388160.0002
Check MTime0.00150.2309160.0001
Mysql Total
Database connection0.00080.119810.0008
Mysqli_queries0.594192.1991540.0110
Looping result0.00050.0791520.0000
Template Total0.611794.920.3059
Template load0.00240.375520.0012
Template processing0.609394.554320.3047
Template load and register function0.00010.019410.0001
states
state_id_array0.00140.219010.0014
state_identifier_array0.00150.240520.0008
Override
Cache load0.00210.3210240.0001
Sytem overhead
Fetch class attribute can translate value0.00100.153220.0005
Fetch class attribute name0.00160.241030.0005
XML
Image XML parsing0.00070.105320.0003
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00230.3543160.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs