I am experiencing this problem which I saw it happened to some others although I can seem to find out some clue of why this might be happening on a few of my drupal sites.

This is the error I got:

Fatal error: Cannot redeclare timer_start() (previously declared in
/home/ariel/wwwroot/drupal-mine/includes/bootstrap.inc:116) in
/home/mcconnel/wwwroot/mcconnelldesign.co.uk/includes/bootstrap.inc on line
122

And it happens completely randomly and in different drupal setups of different sites. I am not sure if the conflicts happens with the same second site or even the two conflicting sites are different. I have around 10+ drupal sites running on this server.

I already went through the following posts:

. http://drupal.org/node/170425
. http://drupal.org/node/247788

I don't have any wordpress installation just two different drupal sites appears to be conflicting (like two different bootstraps.inc being included in the same page??). Also, this appears to start happening recently after no upgrade has been made to the server, except some drupal 5.x upgrades to some of the sites.

This happens on a dedicated linux server running apache/php 5.2.4. I am one of the server administrators so I might help trying to isolate this problem as it appears to had happened to other people as well.

I don't have any opcode or php accelerator whatsoever, or at least not one I have installed myself, I'll ask the hosting company to see if their dedicated server setup comes with something like that by default.

Any ideas?

Comments

hanoii’s picture

I just noticed I put this issue under drupal 6.x category accidentally. It should be on drupal 5.x, if someone with proper access can fix that it'd be great.

vm’s picture

corrected drupal version tag per OP's request above.

Mojah’s picture

Hi Hanoii,

This has been bugging our setup for quite some time. Here is something to try out...

# grep numfile /proc/user_beancounters

Have a look at the failcnt value. Is it high? It should be 0 right? The numfile limit should not be maxing out on a dedicated with a few Drupal sites.

If yes...

# lsof |more

Do you see all many open threads/tables from mysqld? If yes, check your my.cnf settings. Particularly the wait_timeout and interactive_timeout. The default for the first is 28800. Way too long to keep a thread open. Between 60-90 works for us. You can also look at the flush_time variable if you require the wait_timeout to remain high.

Since I edited those variables (~24hrs ago), I have not notices any of those timer_start errors.

Please post back with any further info.

Suerte!

hanoii’s picture

Thanks for the help,

I don't have a /proc/user_beancounters file. I googled a bit about it and it seems to be a file available on Virtuozzo's VPS, am I right?

And about the lsof, not sure what's a lot, but I can count 1787 lines of mysqld entries:

# lsof | grep mysqld | wc -l
1787

But I don't see how mysql threads or open tables may affect php execution, but, not sure.
a.=

Mojah’s picture

It may have to do with the numfile limit on the system, not mysql. I think that when the numfile limit is reached, the execution of php (where include files are involved) becomes unstable. The bootstrap.inc is the first include file right?

Can you find out what your failcnt value is?

Here is mine:
resource held maxheld barrier limit failcnt
numfile 6370 6378 12288 12288 666364

Ever since I changed the wait_timeout variable the failcnt has not changed and we have not seen any of those errors.

We have a bash script running on a dev server that wgets random nodes every 1min and writes them to a textfile on our local machine. On our system, a textfile with the fatal error is 160 bytes and the other textfiles without errors are all 15kb and above. Over the last 24hrs there has not been any textfiles created with that error.

Here's the bash script in case you want to test..We used this to call 3 domains (multi-site setup) on the same VPS.

#!/bin/bash
OF=bk-$(date +%Y%m%d%s).txt
echo $OF
wget www.domain.com -O /home/user/domain/$OF -q

I'm certain this is not a Drupal issue. I saw the same error appear on Wordpress, squirrelmail and another php program we use.

hanoii’s picture

I can't seem to find anything close to that failcnt value. Again I looked around for more info about it and all I can find is reference to it on OpenVZ or Virtuozzo VPS, and my dedicated server, although virtualized, is not using that.

Your test script sounded as a good idea and I have set that up as well trying to find some kind of pattern to compare once I decide to go over a specific configuration entry. Touching that mysql configuration entry is something I'll certainly try but I am trying to gather as much information from this problem as possible.

I also think that's not related to drupal as well :s

hanoii’s picture

How's this problem going on your side? After your changes you completely stop experience this problem?

One question though, what version of PHP do you have? I am starting to think it might be related to some PHP bug, but not sure..

About your user_beancounters and failcnt value to check, I know for a fact that's not a problem on my side. I don't use a virtuozzo or openVZ vps which is a lot stricter as to how much resources each VPS uses, while I can use the full extent of my server so I shouldn't be maxing out any resources, at least that's what I am thinking.

I am still trying to figure out what might be going on though.

Mojah’s picture

Yup, problem resolved as far as we see. No more of those errors anymore.

PHP 5.23, MySQLm4.1.11, CentOS and Xcache.

Sorry about the late reply.

Good luck.