how can I fix this Error?

Author Message

kk kk

Saturday 01 September 2007 10:27:35 pm

FATAL ERROR: Connection to database server failed.Too many connections

I have a dedicated server, how can I fix this problem?

by editing the php.ini ?? if yes, how to do that? thx

André R.

Sunday 02 September 2007 12:07:30 pm

php.ini won't help you there, it's your mysql configuration that are wrongly configured or you simply have reach the limit of your setup. I'll guess mysql is set up wrong since ez publish tends to wear out php/apache before mysql, if mysql is set up correctly.

Mysql comes with quite conservative settings by deafult, so there is a lot you can do. How you set it up depends highly on the server, first and foremost how much RAM it has. Since you really don't want mysql to swap it's memory cache to the hardrive..

Here is the more or less the settings used on a linux box that had the same problem recently since the hoster used default mysql settings:

max_connections = 300
thread_cache_size = 50
query_cache_size = 64M
sort_buffer_size = 3M
key_buffer = 256M
table_cache = 3000

Btw, one of the best written tuning articles for mysql can be found right here on ez.no:
http://ez.no/community/articles/tuning_mysql_for_ez_publish

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

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 31 2025 04:32:17
Script start
Timing: Jan 31 2025 04:32:17
Module start 'layout'
Timing: Jan 31 2025 04:32:17
Module start 'content'
Timing: Jan 31 2025 04:32:17
Module end 'content'
Timing: Jan 31 2025 04:32:17
Script end

Main resources:

Total runtime0.0127 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.1563151.2109
Module start 'layout' 0.00560.0024 739.367236.6484
Module start 'content' 0.00800.0033 776.015690.2969
Module end 'content' 0.01130.0013 866.312529.9922
Script end 0.0126  896.3047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002419.2347140.0002
Check MTime0.00118.5331140.0001
Mysql Total
Database connection0.00096.999210.0009
Mysqli_queries0.002317.819130.0008
Looping result0.00010.448710.0001
Template Total0.00108.110.0010
Template load0.00086.330810.0008
Template processing0.00021.693510.0002
Override
Cache load0.00064.504110.0006
General
dbfile0.00021.734880.0000
String conversion0.00000.062040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs