Analog
Analog

Reputation: 261

php notifications causing massive load

We have 3 drupal webservers (pressflow 6.22) behind a load balancer. Due to a update we are getting a ton of notices from php, while we try to fix these I simply wanted to disable the notices. So I changed the PHP.ini from

error_reporting  =  E_ALL

to

error_reporting = E_ALL & ~E_NOTICE

As soon as I did this, load on the machines skyrocketed by 30x, the number of DB connections doubled.

As soon as I set it back everything went back to normal.

I don't understand how suppressing the notices could cause so much grief. Is it simply putting to much overhead on php to filter those out or something?

A lot of these errors are coming from core and major modules so in some cases I'm not going to want to hack up the module to fix a notification, does that mean I just have to live with them?

TIA

Upvotes: 1

Views: 166

Answers (1)

Wrikken
Wrikken

Reputation: 70500

Hm, internally, notices are still triggered, just not shown or logged. Usually this isn't a problem, however if you define your own set_error_handler, code there might foul things up... Usually, it should do something like if($errno & error_reporting()){/* only then do something */}, but if you define your own error handler you might want to check that code (or post it).

Upvotes: 1

Related Questions