Disable session storing for anonymous access (crawler issues)

Author Message

Benjamin Lorteau

Tuesday 01 February 2011 5:29:19 am

Hello,

I'm running a pretty big site with eZ Publish, and my session table is constantly clogged with anonymous sessions. Thoses sessions are created by the different crawler that access site pages. I have about 150 active session of crawler, and many more inactive but stored until deletion.

Is there a way to delete anonymous session faster, or is there a way to identify search engine crawlers ?

Thanks in advance !

Solution : Upgrade to 4.4 with file based session management. Thanks Guillaume and André !

eZ Publish personal project : http://www.aeriesguard.com [fr]

Guillaume Kulakowski

Tuesday 01 February 2011 8:26:44 am

What is your eZ Publish version ?

In eZP 4.4 you can choose to store session in file system and anonymous doesn't create any session.

Other solution:

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Benjamin Lorteau

Tuesday 01 February 2011 9:30:10 am

I'm still running the 4.3 version.

I already thought of reducing the SessionTimeout, but I don't want to reduce real user agreement for the sake of one big MySQL table ;)

Anyway, thanks for the tips !

eZ Publish personal project : http://www.aeriesguard.com [fr]

André R.

Wednesday 02 February 2011 1:42:10 am

4.4 should be a good boost to your setup, by default it will switch to file based session handler, so if you're on some kind of cluster setup you'll need to make it use db session handler preferably before you upgrade (so it uses when the new code starts to run).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Benjamin Lorteau

Wednesday 02 February 2011 2:16:42 am

Hello André,

thanks for your reply, unfortunately I didn't manage to upgrade cleanly, after the upgrade I had got some pretty big SQL errors about non-existent field (even with SQL upgrade done) so I reverted to 4.3.

I'm not in cluster mode so file based session should be just fine for my setup. I will give another shot at the upgrade but for now I can't afford to pass too many time on it.

eZ Publish personal project : http://www.aeriesguard.com [fr]

Guillaume Kulakowski

Wednesday 02 February 2011 2:23:45 am

"

In eZP 4.4 you can choose to store session in file system and anonymous doesn't create any session.

"

The link: https://github.com/ezsystems/ezpublish/blob/master/doc/bc/4.4/changes-4.4.0.txt#L26

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Benjamin Lorteau

Monday 21 March 2011 5:48:49 am

I recently upgraded in 4.4 (with some problems though), so there's no longer a problem for me. Thanks for the tips !

eZ Publish personal project : http://www.aeriesguard.com [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 00:04:05
Script start
Timing: Jan 18 2025 00:04:05
Module start 'layout'
Timing: Jan 18 2025 00:04:05
Module start 'content'
Timing: Jan 18 2025 00:04:05
Module end 'content'
Timing: Jan 18 2025 00:04:06
Script end

Main resources:

Total runtime0.8733 sec
Peak memory usage4,096.0000 KB
Database Queries72

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.1719152.6563
Module start 'layout' 0.00520.0040 740.828139.5156
Module start 'content' 0.00920.8616 780.3438638.6641
Module end 'content' 0.87090.0024 1,419.007820.0938
Script end 0.8732  1,439.1016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4356160.0002
Check MTime0.00140.1567160.0001
Mysql Total
Database connection0.00060.064810.0006
Mysqli_queries0.799491.5346720.0111
Looping result0.00070.0802700.0000
Template Total0.840996.320.4205
Template load0.00210.239720.0010
Template processing0.838896.053720.4194
Template load and register function0.00010.012410.0001
states
state_id_array0.00140.165610.0014
state_identifier_array0.00120.132320.0006
Override
Cache load0.00180.2117430.0000
Sytem overhead
Fetch class attribute can translate value0.00110.123330.0004
Fetch class attribute name0.00170.1958100.0002
XML
Image XML parsing0.00160.187830.0005
class_abstraction
Instantiating content class attribute0.00000.0035140.0000
General
dbfile0.00100.1174300.0000
String conversion0.00000.001340.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
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
2content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
2content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 35
 Number of unique templates used: 10

Time used to render debug report: 0.0001 secs