Forums / Install & configuration / Problem with Apache/eZpublish4.2 who crash several time

Problem with Apache/eZpublish4.2 who crash several time

Author Message

julien fonky

Wednesday 05 January 2011 1:09:36 am

Hello,

I'am in charge of a website eZpublish 4.2 that periodically crash when there is little traffic.

Apache processes are increasing, the CPU increases to reach saturation, and the site become down. Must wait for the connection timeout to retrieve the website. (httpd <defunct> in the list of processes)

I reproduce the problem, I use linkExaminer who scans the URL of the site which create aVirtual high traffic and there is the drama! :p

I tried everything without really knowing what to modify:
- modified the Apache conf

- modified the MySQL conf

Now I don't know what to do to resolved this problem.

Is someone takes advises or better the correction of this problem ?

Thank you for your answers and excuse my english ! ;-)
Now in french :
Bonjour,

J'ai repris un site en eZpublish 4.2 qui crash périodiquement quand il y a un peu de trafic.

Les processus d'Apache se multiplient, le CPU augmente jusqu'à arriver à saturation, et le site est inaccessible. Il faut attendre le timeout des connexions httpd pour retrouver le site, voir relancer les services. (Tous les processus httpd passe par l'état <defunct>)

J'arrive à bien reproduire le problèmes, j'utilise linkExaminer qui me scanne toutes les url du site créant un fort trafic virtuel et là c'est le drame ! :p

J'ai tout essayé sans savoir vraiment quoi modifier :
- modification de la conf Apache

- modification de la conf de MySQL

et là je sèche...

Quelqu'un aurait il rencontré et résolu le même problème ?

Merci pour vos réponses.

Carlos Revillo

Wednesday 05 January 2011 1:34:37 am

Apache conf and MySQL conf will help, but imho i think the problem comes from the aplication itself. linkExaminer is some kinda crawler or something like that? then probably it is doing lot of request to the app and probably the app needs to be optimized, probably adding more cache.

I would try to find problematic urls. Having the site in dev environment, i will enable debugoutput in order to see what happens with some urls. I will look specially to the mysql queries needed for generating the pages and also for the time the scripts needs to finish.

that could give you some hints on what you should need to optimize and so, linkExaminer request can be server without needing lot of server resources.

Bertrand Dunogier

Friday 07 January 2011 3:11:13 am

You could use apache's extended server-status to see what URLs might be executing for too long, and see what's wrong with them.

As said by Carlos, chances are that the site is anti-optimized. This is very common, as some people get pissed of by caching as they haven't read the doc, and will then disable caching altogether as it is much easier :-)

Enable DebugOutput, and see how many SQL Queries are executed by some example pages. Report the numbers to us, and we'll try to help you.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Quoc Huy Nguyen Dinh

Wednesday 12 January 2011 3:46:03 am

I agree with the above comments and would add that after optimizing the site. You should add a reverse proxy such as Nginx or Varnish in front of Apache, at least to serve static files.

eZ debug

Timing: Jan 17 2025 23:39:50
Script start
Timing: Jan 17 2025 23:39:50
Module start 'content'
Timing: Jan 17 2025 23:39:51
Module end 'content'
Timing: Jan 17 2025 23:39:51
Script end

Main resources:

Total runtime0.8962 sec
Peak memory usage4,096.0000 KB
Database Queries201

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.9766180.8125
Module start 'content' 0.00600.7391 768.7891640.9922
Module end 'content' 0.74510.1510 1,409.7813337.3750
Script end 0.8961  1,747.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.5409210.0002
Check MTime0.00160.1805210.0001
Mysql Total
Database connection0.00080.085310.0008
Mysqli_queries0.813790.78742010.0040
Looping result0.00230.25591990.0000
Template Total0.862996.320.4315
Template load0.00330.364220.0016
Template processing0.859695.918720.4298
Template load and register function0.00020.024110.0002
states
state_id_array0.00220.247210.0022
state_identifier_array0.00160.178720.0008
Override
Cache load0.00270.2990370.0001
Sytem overhead
Fetch class attribute can translate value0.00140.158150.0003
Fetch class attribute name0.00100.113060.0002
XML
Image XML parsing0.00160.174750.0003
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00340.3847350.0001
String conversion0.00000.000330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs